You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
412 B
31 lines
412 B
5 years ago
|
/*
|
||
|
* semaphore.c
|
||
|
*
|
||
|
* Created on: Dec 18, 2017
|
||
|
* Author: maximilian
|
||
|
*/
|
||
|
|
||
|
#include"ostypes.h"
|
||
|
|
||
|
osSemaphoreHandle_t osSemaphoreCreateBinary(void)
|
||
|
{
|
||
|
osSemaphoreHandle_t new_semaphore;
|
||
|
new_semaphore.type = BINARY;
|
||
|
new_semaphore.data =
|
||
|
}
|
||
|
|
||
|
uint8_t osSemaphoreTake(osSemaphore_t* isemaphore)
|
||
|
{
|
||
|
if(*isemaphore == AVAILABLE)
|
||
|
{
|
||
|
*iisemaphore = TAKEN;
|
||
|
return 0;
|
||
|
}
|
||
|
return ;
|
||
|
}
|
||
|
|
||
|
void osSemaphoreGive()
|
||
|
{
|
||
|
|
||
|
}
|