/**
|
* @file Ems_common.h
|
* @author your name (you@domain.com)
|
* @brief
|
* @version 0.1
|
* @date 2023-04-05
|
*
|
* @copyright Copyright (c) 2023
|
*
|
*/
|
|
#ifndef EMS_COMMON_H
|
#define EMS_COMMON_H
|
|
/* includes ----------------------------------------------------------------- */
|
#include <stdint.h>
|
|
#if (EMS_RTOS_CMSIS_OS_EN != 0)
|
#include "ems_port.h"
|
#include "cmsis_os.h"
|
#endif
|
|
#ifdef __cplusplus
|
extern "C" {
|
#endif
|
|
/* public typedef ----------------------------------------------------------- */
|
/* time related. */
|
uint32_t ems_time_ms(void);
|
|
/* uart debug related. */
|
void ems_debug_uart_init(uint32_t baudrate);
|
int16_t ems_debug_uart_send(void *buffer, uint16_t size);
|
int16_t ems_debug_uart_receive(void *buffer, uint16_t size);
|
void ems_debug_uart_buffer_clear(void);
|
|
#if (EMS_RTOS_CMSIS_OS_EN != 0)
|
/* thread related. */
|
osThreadId_t ems_thread_init(ems_thread_t *const me,
|
void (*entry)(void *parameter),
|
const char *name, void *data,
|
void *stack, uint32_t stack_size,
|
uint8_t priority);
|
#endif
|
|
#ifdef __cplusplus
|
}
|
#endif
|
|
#endif
|
|
/* ----------------------------- end of file -------------------------------- */
|