Go to the documentation of this file.
21 #define MODULE "exploration_server_stm32"
23 #define LOG_BUFFER_MAX_SIZE 150
25 #define STM32_EXPLORATION_SERVER_MAX_BAUDRATE 2000000
33 #define UART_DMA_BUFFER_SIZE (8192)
70 const uint8_t *data8 = (
const uint8_t *)data;
138 .ticks_per_second = 1000,
164 int32_t ticks_until_next = 0;
172 ACC_LOG_ERROR(
"Exploration server command 'stop_application' not supported.");
180 if (ticks_until_next > 1)
203 if ((huart->ErrorCode & HAL_UART_ERROR_FE) == HAL_UART_ERROR_FE)
205 HAL_NVIC_SystemReset();
225 va_start(ap, format);
250 printf(
"Acconeer Exploration Server\n");
255 printf(
"Waiting for host line break to end...\n");
@ ACC_EXPLORATION_SERVER_STOPPED
void acc_exploration_server_stm32_main(void)
Start the stm32 exploration server.
#define LOG_BUFFER_MAX_SIZE
uint32_t acc_integration_get_time(void)
Get current time.
static void set_baudrate(uint32_t baudrate)
#define STM32_EXPLORATION_SERVER_MAX_BAUDRATE
#define UART_RX_GPIO_Port
Struct to handle input for acc_exploration_server_process_cmds.
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *h_uart)
#define ACC_LOG_ERROR(...)
void acc_exploration_server_stm32_init(const char *hw, char *buffer, size_t buffer_size)
Init the stm32 exploration server.
acc_log_level_t
This enum represents the different log levels for RSS.
static char exploration_server_command_buffer[2048]
bool acc_exploration_server_init(char *buffer, size_t buffer_size, const char *hw, acc_log_level_t log_level)
Initialize the exploration server.
static const exploration_server_interface_t server_if
Server interface functions.
static uint8_t uart_dma_buffer[(8192)]
@ ACC_EXPLORATION_SERVER_STREAMING
acc_exploration_server_state_t
static uint32_t get_tick(void)
static volatile bool uart_tx_active
@ ACC_EXPLORATION_SERVER_WAITING
static void uart_wait_for_tx_done(void)
UART_HandleTypeDef EXPLORATION_SERVER_UART_HANDLE
#define UART_DMA_BUFFER_SIZE
int acconeer_main(int argc, char *argv[])
Assembly test example.
bool acc_exploration_server_send_log(write_data_function_t write_func, acc_log_level_t level, const char *module, const char *buffer)
Sends a log as a json package.
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
: Header for main.c file. This file contains the common defines of the application.
static size_t command_buffer_size
write_data_function_t * write
static char * command_buffer
bool acc_exploration_server_process(const exploration_server_interface_t *server_if, acc_exploration_server_state_t *state, int32_t *ticks_until_next)
The exploration server process function.
static void restart_input(void)
Restart input of new command.
void acc_integration_log(acc_log_level_t level, const char *module, const char *format,...)
Log function.
static void write_to_client(const void *data, uint32_t size)
Write data to client (UART)