RTOS refactoring + more AVR removal
This commit is contained in:
@@ -86,7 +86,7 @@ void btSendBuffer()
|
||||
btTx.buffer = btTxBuffer;
|
||||
txPdcBt(&btTx);
|
||||
while (btTx.ready == 1) {
|
||||
CoTickDelay(1); // 2ms for now
|
||||
RTOS_WAIT_TICKS(1);
|
||||
}
|
||||
btTx.size = 0;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ uint32_t btChangeBaudrate( uint32_t baudIndex )
|
||||
}
|
||||
}
|
||||
else {
|
||||
CoTickDelay(1) ; // 2mS
|
||||
RTOS_WAIT_TICKS(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ uint32_t btPollDevice()
|
||||
}
|
||||
}
|
||||
else {
|
||||
CoTickDelay(1) ; // 2mS
|
||||
RTOS_WAIT_TICKS(1) ; // 2mS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ void bluetoothTask(void * pdata)
|
||||
x = 0 ;
|
||||
}
|
||||
btSetBaudrate(x) ;
|
||||
CoTickDelay(1) ; // 2mS
|
||||
RTOS_WAIT_TICKS(1) ; // 2mS
|
||||
btStatus = btPollDevice() ; // Do we get a response?
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,7 @@ void bluetoothTask(void * pdata)
|
||||
btInit();
|
||||
}
|
||||
|
||||
CoTickDelay(1) ;
|
||||
RTOS_WAIT_TICKS(1) ;
|
||||
|
||||
btPollDevice(); // Do we get a response?
|
||||
|
||||
|
||||
@@ -223,9 +223,6 @@ extern uint8_t temperature ; // Raw temp reading
|
||||
extern uint8_t maxTemperature ; // Raw temp reading
|
||||
uint8_t getTemperature();
|
||||
|
||||
#define strcpy_P strcpy
|
||||
#define strcat_P strcat
|
||||
|
||||
#if !defined(REVA)
|
||||
extern uint16_t Current_analogue;
|
||||
extern uint16_t Current_max;
|
||||
|
||||
@@ -79,7 +79,7 @@ uint32_t transSpeed;
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
#if !defined(BOOT)
|
||||
static OS_MutexID ioMutex;
|
||||
static RTOS_MUTEX_HANDLE ioMutex;
|
||||
volatile int mutexCheck = 0;
|
||||
int ff_cre_syncobj (BYTE vol, _SYNC_t *mutex)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ int ff_cre_syncobj (BYTE vol, _SYNC_t *mutex)
|
||||
|
||||
int ff_req_grant (_SYNC_t mutex)
|
||||
{
|
||||
CoEnterMutexSection(mutex);
|
||||
RTOS_LOCK_MUTEX(mutex);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ const char * sdIdentify()
|
||||
* The host that does not support CMD8 shall supply high voltage range... */
|
||||
result = sdCmd8(1);
|
||||
if (result == 0) f8 = 1;
|
||||
else if (result == SD_NORESPONSE) CoTickDelay(1); /* 2ms delay after "no response" */
|
||||
else if (result == SD_NORESPONSE) RTOS_WAIT_MS(2); /* 2ms delay after "no response" */
|
||||
else return "Identify.8 error";
|
||||
|
||||
#if 0
|
||||
@@ -956,7 +956,7 @@ void sdInit()
|
||||
}
|
||||
|
||||
sdCmd0();
|
||||
CoTickDelay(5); // 10ms
|
||||
RTOS_WAIT_MS(10); // 10ms
|
||||
sdCmd8(1);
|
||||
|
||||
#if 0
|
||||
@@ -971,7 +971,7 @@ void sdInit()
|
||||
uint8_t retry;
|
||||
for (retry=0; retry<10; retry++) {
|
||||
if (!sdCmd2()) break;
|
||||
CoTickDelay(1); // 2ms
|
||||
RTOS_WAIT_MS(2); // 2ms
|
||||
}
|
||||
|
||||
if (retry == 10) {
|
||||
@@ -982,7 +982,7 @@ void sdInit()
|
||||
|
||||
for (retry=0; retry<10; retry++) {
|
||||
if (!sdCmd3()) break;
|
||||
CoTickDelay(1); // 2ms
|
||||
RTOS_WAIT_MS(2); // 2ms
|
||||
}
|
||||
|
||||
if (retry == 10) {
|
||||
|
||||
Reference in New Issue
Block a user