|
GPS Device
|
Console module implementation. More...
#include <stdbool.h>#include "console.h"#include "cbuf.h"#include "common.h"#include "err.h"#include "stm32f401re.h"#include "stm32f401re_gpio.h"#include "stm32f401re_usart.h"#include "cmd.h"#include "configuration.h"#include "log.h"#include "init.h"
Go to the source code of this file.
Classes | |
| struct | internal_state_s |
| Internal state of the SysTick driver. More... | |
Macros | |
| #define | CONSOLE_MODE_CMD 3 |
| ASCII control code used to enter and exit console mode (Ctrl+C). | |
Functions | |
| ERR_te | console_init (CONSOLE_HANDLE_ts *console_handle) |
| Initializes the console subsystem. | |
| ERR_te | console_run (void) |
| Runs the console state machine. | |
| void | usart1_irq_data_recv_callback (uint8_t data) |
| USART RXNE interrupt callback. Writes the received byte into the USART receive buffer. | |
Variables | |
| static uint8_t | usart_cbuf_mem [CONFIG_CONSOLE_USART_CBUF_SIZE] |
| Backing memory for the USART receive circular buffer. | |
| static uint8_t | console_cbuf_mem [CONFIG_CONSOLE_CBUF_SIZE] |
| Backing memory for the console command accumulation buffer. | |
| static struct internal_state_s | internal_state |
| Singleton instance of the console subsystem internal state. | |
Console module implementation.
Definition in file console.c.
| #define CONSOLE_MODE_CMD 3 |
|
static |
Backing memory for the USART receive circular buffer.
Written by the USART ISR callback and drained by console_run. Size is defined by CONFIG_CONSOLE_USART_CBUF_SIZE and must be a power of two.
|
static |
|
static |
Singleton instance of the console subsystem internal state.
Definition at line 73 of file console.c.