added handling of CanData To Tasks
This commit is contained in:
1
tests/native/mock_os/FreeRTOS.h
Normal file
1
tests/native/mock_os/FreeRTOS.h
Normal file
@@ -0,0 +1 @@
|
||||
typedef unsigned long int StaticTask_t;
|
||||
@@ -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);
|
||||
|
||||
4
tests/native/mock_os/crc.h
Normal file
4
tests/native/mock_os/crc.h
Normal 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);
|
||||
15
tests/native/mock_os/fatfs.h
Normal file
15
tests/native/mock_os/fatfs.h
Normal 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
1716
tests/native/mock_os/fdcan.h
Normal file
File diff suppressed because it is too large
Load Diff
9
tests/native/mock_os/mock_hal.c
Normal file
9
tests/native/mock_os/mock_hal.c
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
#include "fdcan.h"
|
||||
#include "crc.h"
|
||||
|
||||
|
||||
|
||||
HAL_StatusTypeDef HAL_FDCAN_ConfigFilter(FDCAN_HandleTypeDef *hfdcan, FDCAN_FilterTypeDef *sFilterConfig) {
|
||||
return 0;
|
||||
}
|
||||
4
tests/native/mock_os/usbd_cdc_if.h
Normal file
4
tests/native/mock_os/usbd_cdc_if.h
Normal file
@@ -0,0 +1,4 @@
|
||||
uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len);
|
||||
|
||||
#define USBD_BUSY 1
|
||||
#define USBD_OK 0
|
||||
Reference in New Issue
Block a user