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:
DrZlo13
2020-10-29 10:58:19 +03:00
committed by GitHub
parent f9b6440f7f
commit 979af6c165
40 changed files with 175 additions and 424 deletions

View File

@@ -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;
}

View File

@@ -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);