added handling of CanData To Tasks

This commit is contained in:
2024-02-04 23:38:22 +01:00
parent 0a72c8b553
commit bfc28e6c94
16 changed files with 2658 additions and 148 deletions

View File

@@ -0,0 +1 @@
typedef unsigned long int StaticTask_t;

View File

@@ -104,4 +104,9 @@ void Error_Handler();
osThreadId_t osThreadNew(osThreadFunc_t func, void *argument, const osThreadAttr_t *attr);
osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout);
osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout);
osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) ;
osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) ;
osStatus_t osDelay (uint32_t ticks);
uint32_t osKernelGetSysTimerCount (void);

View File

@@ -0,0 +1,4 @@
typedef uint32_t CRC_HandleTypeDef;
extern CRC_HandleTypeDef hcrc;
uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);

View File

@@ -0,0 +1,15 @@
#include "stdint.h"
typedef unsigned int FRESULT;
typedef struct
{
void * ptr; /* data */
}FIL;
FRESULT f_open (FIL* fp, const char* path, uint8_t mode); /* Open or create a file */
FRESULT f_close (FIL* fp); /* Close an open file object */
FRESULT f_write (FIL* fp, const void* buff, uint32_t btw, uint32_t* bw); /* Write data to the file */
#define FA_CREATE_ALWAYS 0
#define FA_WRITE 0

1716
tests/native/mock_os/fdcan.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
#include "fdcan.h"
#include "crc.h"
HAL_StatusTypeDef HAL_FDCAN_ConfigFilter(FDCAN_HandleTypeDef *hfdcan, FDCAN_FilterTypeDef *sFilterConfig) {
return 0;
}

View File

@@ -0,0 +1,4 @@
uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len);
#define USBD_BUSY 1
#define USBD_OK 0