|
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "main.h"
#include "acc_exploration_server_base.h"
#include "acc_exploration_server_stm32.h"
#include "acc_integration.h"
#include "acc_integration_log.h"
Go to the source code of this file.
Macros | |
#define | MODULE "exploration_server_stm32" |
#define | LOG_BUFFER_MAX_SIZE 150 |
#define | STM32_EXPLORATION_SERVER_MAX_BAUDRATE 2000000 |
#define | UART_DMA_BUFFER_SIZE (8192) |
Functions | |
static void | uart_wait_for_tx_done (void) |
static void | write_to_client (const void *data, uint32_t size) |
Write data to client (UART) More... | |
static void | restart_input (void) |
Restart input of new command. More... | |
static void | set_baudrate (uint32_t baudrate) |
static uint32_t | get_tick (void) |
void | acc_exploration_server_stm32_init (const char *hw, char *buffer, size_t buffer_size) |
Init the stm32 exploration server. More... | |
void | acc_exploration_server_stm32_main (void) |
Start the stm32 exploration server. More... | |
void | HAL_UART_ErrorCallback (UART_HandleTypeDef *huart) |
void | HAL_UART_TxCpltCallback (UART_HandleTypeDef *h_uart) |
void | acc_integration_log (acc_log_level_t level, const char *module, const char *format,...) |
Log function. More... | |
int | acconeer_main (int argc, char *argv[]) |
Assembly test example. More... | |
Variables | |
UART_HandleTypeDef | EXPLORATION_SERVER_UART_HANDLE |
static char * | command_buffer = NULL |
static size_t | command_buffer_size = 0 |
static volatile bool | uart_tx_active = false |
static uint8_t | uart_dma_buffer [(8192)] |
static char | exploration_server_command_buffer [2048] |
static const exploration_server_interface_t | server_if |
Server interface functions. More... | |
#define LOG_BUFFER_MAX_SIZE 150 |
Definition at line 23 of file acc_exploration_server_stm32.c.
#define MODULE "exploration_server_stm32" |
Definition at line 21 of file acc_exploration_server_stm32.c.
#define STM32_EXPLORATION_SERVER_MAX_BAUDRATE 2000000 |
Definition at line 25 of file acc_exploration_server_stm32.c.
#define UART_DMA_BUFFER_SIZE (8192) |
Definition at line 33 of file acc_exploration_server_stm32.c.
void acc_exploration_server_stm32_init | ( | const char * | hw, |
char * | buffer, | ||
size_t | buffer_size | ||
) |
Init the stm32 exploration server.
[in] | hw | The name of the hardware platform |
[in] | buffer | The buffer used for receiving commands from the client |
[in] | buffer_size | The size of the command buffer |
Definition at line 142 of file acc_exploration_server_stm32.c.
void acc_exploration_server_stm32_main | ( | void | ) |
Start the stm32 exploration server.
The embedded exploration server for STM32 can stream UART input data directly into the input buffer.
Setup DMA into buffer with buffer_size.
Definition at line 150 of file acc_exploration_server_stm32.c.
void acc_integration_log | ( | acc_log_level_t | level, |
const char * | module, | ||
const char * | format, | ||
... | |||
) |
Log function.
This log function can be used as a complement to for example printf. It adds useful information to the log such as time and log level
[in] | level | The severity level for the log |
[in] | module | The name of the SW module from where the log is called |
[in] | format | The information to be logged, same format as for printf |
Definition at line 220 of file acc_exploration_server_stm32.c.
int acconeer_main | ( | int | argc, |
char * | argv[] | ||
) |
Assembly test example.
Surface velocity example application.
Tank level reference application.
Smart presence reference application.
Breathing example application.
Service subsweeps example.
Service multple configurations example.
Low power service example.
Service example.
Processing subtract adaptive background example.
Processing static presence example.
Processing peak interpolation example.
Processing noncoherent mean example.
Processing coherent mean example.
Processing amplitude example.
Detector presence example with multiple configurations.
Low power detector presence example.
Detector presence example.
Distance detector low power example.
Detector distance example.
Control helper example.
Test if measure on wake up is enable Do a measurement if the the detector is ready (configured and calibrated)
Definition at line 245 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 123 of file acc_exploration_server_stm32.c.
void HAL_UART_ErrorCallback | ( | UART_HandleTypeDef * | huart | ) |
Definition at line 198 of file acc_exploration_server_stm32.c.
void HAL_UART_TxCpltCallback | ( | UART_HandleTypeDef * | h_uart | ) |
Definition at line 211 of file acc_exploration_server_stm32.c.
|
static |
Restart input of new command.
Stop previous reception Clear buffer Re-start receive after a line has been received.
Definition at line 92 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 106 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 41 of file acc_exploration_server_stm32.c.
|
static |
Write data to client (UART)
[in] | data | pointer to data |
[in] | size | data size in bytes |
Definition at line 68 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 29 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 30 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 38 of file acc_exploration_server_stm32.c.
UART_HandleTypeDef EXPLORATION_SERVER_UART_HANDLE |
|
static |
Server interface functions.
Definition at line 132 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 36 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 35 of file acc_exploration_server_stm32.c.