40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
#ifndef ESP_HOSTED_NXP_PLATFORM_WRAPPER_H
|
|
#define ESP_HOSTED_NXP_PLATFORM_WRAPPER_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define MCU_SYS 1
|
|
|
|
#define CTRL__TIMER_ONESHOT (0)
|
|
|
|
#define HOSTED_SEM_BLOCKING (-1)
|
|
|
|
#define mem_free free
|
|
#define hosted_malloc malloc
|
|
#define hosted_calloc calloc
|
|
#define hosted_free free
|
|
|
|
int control_path_platform_init(void);
|
|
int control_path_platform_deinit(void);
|
|
|
|
void *hosted_thread_create(void (*start_routine)(void const *), void *arg);
|
|
int hosted_thread_cancel(void *thread_handle);
|
|
|
|
void *hosted_create_semaphore(int init_value);
|
|
int hosted_get_semaphore(void *semaphore_handle, int timeout);
|
|
int hosted_post_semaphore(void *semaphore_handle);
|
|
int hosted_destroy_semaphore(void *semaphore_handle);
|
|
|
|
void *hosted_timer_start(int duration, int type, void (*timeout_handler)(void const *), void *arg);
|
|
int hosted_timer_stop(void *timer_handle);
|
|
|
|
unsigned int msleep(unsigned int mseconds);
|
|
unsigned int sleep(unsigned int seconds);
|
|
|
|
void *serial_drv_open(const char *transport);
|
|
int serial_drv_write(void *handle, uint8_t *buf, int in_count, int *out_count);
|
|
uint8_t *serial_drv_read(void *handle, uint32_t *out_nbyte);
|
|
int serial_drv_close(void *handle);
|
|
|
|
#endif /* ESP_HOSTED_NXP_PLATFORM_WRAPPER_H */
|