|
|
#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_uart (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 [4096] |
| static const exploration_server_interface_t | server_if |
| Server interface functions. More... | |
| #define LOG_BUFFER_MAX_SIZE 150 |
Definition at line 22 of file acc_exploration_server_stm32.c.
| #define MODULE "exploration_server_stm32" |
Definition at line 20 of file acc_exploration_server_stm32.c.
| #define STM32_EXPLORATION_SERVER_MAX_BAUDRATE 2000000 |
Definition at line 24 of file acc_exploration_server_stm32.c.
| #define UART_DMA_BUFFER_SIZE (8192) |
Definition at line 31 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 132 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 140 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 207 of file acc_exploration_server_stm32.c.
| int acconeer_main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Assembly test example.
Touchless button application.
Tank level reference application.
Smart presence reference application.
Parking application.
Breathing example application.
Waste level application.
Vibration example.
Surface velocity example application.
Service subsweeps example.
Service multple configurations example.
Low power service example.
Service sensor calibration caching 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.
hand motion application
Detector presence example with multiple configurations.
Low power detector presence example.
Detector presence example.
Detector distance example with iq data print.
Distance detector low power example.
Detector distance with calibration caching example.
Detector distance example.
Control helper example.
Cargo application.
Test if measure on wake up is enable Do a measurement if the the detector is ready (configured and calibrated)
Definition at line 230 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 115 of file acc_exploration_server_stm32.c.
| void HAL_UART_ErrorCallback | ( | UART_HandleTypeDef * | huart | ) |
Definition at line 187 of file acc_exploration_server_stm32.c.
| void HAL_UART_TxCpltCallback | ( | UART_HandleTypeDef * | h_uart | ) |
Definition at line 199 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 85 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 98 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 38 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 62 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 28 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 29 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 36 of file acc_exploration_server_stm32.c.
| UART_HandleTypeDef EXPLORATION_SERVER_UART_HANDLE |
|
static |
Server interface functions.
Definition at line 123 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 34 of file acc_exploration_server_stm32.c.
|
static |
Definition at line 33 of file acc_exploration_server_stm32.c.