RTOS refactoring + more AVR removal
This commit is contained in:
@@ -95,9 +95,6 @@ extern "C" {
|
||||
#define TIMER_MULT_APB1 2
|
||||
#define TIMER_MULT_APB2 2
|
||||
|
||||
#define strcpy_P strcpy
|
||||
#define strcat_P strcat
|
||||
|
||||
extern uint16_t sessionTimer;
|
||||
|
||||
#define SLAVE_MODE() (g_model.trainerMode == TRAINER_MODE_SLAVE)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/* Lock / unlock functions */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
#if !defined(BOOT)
|
||||
static OS_MutexID ioMutex;
|
||||
static RTOS_MUTEX_HANDLE ioMutex;
|
||||
uint32_t ioMutexReq = 0, ioMutexRel = 0;
|
||||
int ff_cre_syncobj (BYTE vol, _SYNC_t *mutex)
|
||||
{
|
||||
@@ -44,13 +44,14 @@ int ff_cre_syncobj (BYTE vol, _SYNC_t *mutex)
|
||||
int ff_req_grant (_SYNC_t mutex)
|
||||
{
|
||||
ioMutexReq += 1;
|
||||
return CoEnterMutexSection(mutex) == E_OK;
|
||||
RTOS_LOCK_MUTEX(mutex);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ff_rel_grant (_SYNC_t mutex)
|
||||
{
|
||||
ioMutexRel += 1;
|
||||
CoLeaveMutexSection(mutex);
|
||||
RTOS_UNLOCK_MUTEX(mutex);
|
||||
}
|
||||
|
||||
int ff_del_syncobj (_SYNC_t mutex)
|
||||
|
||||
Reference in New Issue
Block a user