Core code cleanup (#206)
* add delay function * todo about delay_isr * remove arduino defines and fix all apps to use core-api/hal-api * delay for local target * remove warnings of task_equal * fix BSP_SD_Init * fix USBD_static * grio read constant pointer to gpio * add TODO about ISR context * const void* arg for pubsub api * mark unused functions * app pointers now pointed to constant apps * fix printf format * fix "unused" warnings in local target * fix const pin read in local target * fix int to pointer warnings in local target * power read mutex error fix * delete old makefile * add -werror Co-authored-by: Aleksandr Kutuzov <aku@plooks.com> Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
@@ -16,4 +16,6 @@ HAL_UART_Transmit(UART_HandleTypeDef* handle, uint8_t* bufer, uint16_t size, uin
|
||||
return res;
|
||||
}
|
||||
|
||||
void BSP_SD_Init() {}
|
||||
uint8_t BSP_SD_Init() {
|
||||
return 0;
|
||||
}
|
||||
|
@@ -74,12 +74,6 @@ TaskHandle_t xTaskGetCurrentTaskHandle(void) {
|
||||
return thread;
|
||||
}
|
||||
|
||||
bool task_equal(TaskHandle_t a, TaskHandle_t b) {
|
||||
if(a == NULL || b == NULL) return false;
|
||||
|
||||
return pthread_equal(*a, *b) != 0;
|
||||
}
|
||||
|
||||
BaseType_t xQueueSend(QueueHandle_t xQueue, const void* pvItemToQueue, TickType_t xTicksToWait) {
|
||||
// TODO: add implementation
|
||||
return pdTRUE;
|
||||
@@ -269,11 +263,11 @@ osStatus_t osMutexDelete (osMutexId_t mutex_id) {
|
||||
osSemaphoreId_t osSemaphoreNew(uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) {
|
||||
if(max_count != 1) {
|
||||
// Non-binary semaphors are not supported at the moment
|
||||
return osErrorParameter;
|
||||
return NULL;
|
||||
}
|
||||
if(attr != NULL) {
|
||||
// Attributes are not supported at the moment
|
||||
return osErrorParameter;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SemaphoreHandle_t handle = osMutexNew(NULL);
|
||||
|
Reference in New Issue
Block a user