CuVoodoo STM32F1 firmware template
|
BusVoodoo global definitions and methods (code) More...
Go to the source code of this file.
Macros | |
#define | BUSVOODOO_LED_TIMER 5 |
timer peripheral | |
Functions | |
void | busvoodoo_setup (void) |
setup BusVoodoo board | |
void | busvoodoo_safe_state (void) |
set safe state by disabling all outputs | |
bool | busvoodoo_vout_switch (bool on) |
switch 3V3 and 5V power outputs on I/O connector More... | |
float | busvoodoo_vreg_get (uint8_t channel) |
read voltage from power rail More... | |
float | busvoodoo_lv_set (float voltage) |
set voltage on low voltage adjustable voltage regulator More... | |
float | busvoodoo_hv_set (float voltage) |
set voltage on high voltage adjustable voltage regulator More... | |
float | busvoodoo_embedded_pullup (bool on) |
enable embedded pull-up resistors More... | |
static void | busvoodoo_led_update (void) |
update LED status according to LED flags | |
void | busvoodoo_led_blue_pulse (uint16_t ms) |
pulse blue LED for short duration More... | |
void | busvoodoo_led_red_pulse (uint16_t ms) |
pulse red LED for short duration More... | |
bool | busvoodoo_global_actions (char *actions, bool perform, bool(*action_handler)(const char *action, uint32_t repetition, bool perform)) |
parse and perform actions More... | |
static void | busvoodoo_global_power (void *argument) |
switch 3V3 and 5V power rails on/off More... | |
static void | busvoodoo_global_lv (void *argument) |
set lV linear drop-out voltage regulator voltage More... | |
static void | busvoodoo_global_hv (void *argument) |
set HV step-up voltage regulator voltage More... | |
static void | busvoodoo_global_pinout (void *argument) |
display I/O and RS/CAN connector pinouts More... | |
void TIM_ISR() | BUSVOODOO_LED_TIMER (void) |
interrupt service routine called on LED timeout | |
Variables | |
static volatile bool | busvoodoo_global_led_blue = false |
blue LED status | |
static volatile bool | busvoodoo_global_led_red = false |
red LED status | |
static const float | busvoodoo_version_voltages [] = {100.0/(10.0+100.0)*3.3} |
hardware version voltages, calculated from divider ratios, starting with version A | |
const char * | busvoodoo_global_pinout_io [10] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} |
I/O connector pinout. | |
const char * | busvoodoo_global_pinout_rscan [5] = {NULL, NULL, NULL, NULL, NULL} |
RS/CAN connector pinout. | |
const char * | busvoodoo_io_names [13] = {"I2C_SMBA/SPI_NSS/I2S_WS/UART1_CK", "SDIO_CMD", "UART1_CTS/SPI_SCK/I2S_CK", "SDIO_D3/UART2_RX", "I2C_SDA/UART1_RX", "SDIO_D0", "SPI_MOSI/I2S_SD", "SDIO_CK", "I2C_SCL/UART1_TX", "SDIO_D1", "I2S_MCK", "UART1_RTS/SPI_MISO", "SDIO_D2/UART2_TX"} |
I/O individual signal names. | |
const uint32_t | busvoodoo_io_ports [13] = {GPIOB, GPIOD, GPIOB, GPIOC, GPIOB, GPIOC, GPIOB, GPIOC, GPIOB, GPIOC, GPIOC, GPIOB, GPIOC} |
port of individual signals | |
const uint32_t | busvoodoo_io_pins [13] = {GPIO12, GPIO2, GPIO13, GPIO11, GPIO11, GPIO8, GPIO15, GPIO12, GPIO10, GPIO9, GPIO6, GPIO14, GPIO10} |
pin of individual signals | |
const uint8_t | busvoodoo_io_groups [13] = {6, 6, 4, 4, 1, 1, 5, 5, 2, 2, 3, 3, 3} |
which I/O pin (group) does the signal belong to | |
bool | busvoodoo_full = false |
is the BusVoodoo board fully populated (with HV voltage regulator, RS-232, RS-485, CAN transceiver on the back side) | |
char | busvoodoo_version = '0' |
version of the hardware board | |
char | busvoodoo_global_string [64] |
shared string buffer, i.e. More... | |
const struct menu_command_t | busvoodoo_global_commands [] |
list of supported commands | |
const uint8_t | busvoodoo_global_commands_nb = LENGTH(busvoodoo_global_commands) |
number supported commands | |
BusVoodoo global definitions and methods (code)
Definition in file busvoodoo_global.c.
float busvoodoo_embedded_pullup | ( | bool | on | ) |
enable embedded pull-up resistors
[in] | on | enable (true) or disable (false) embedded pull-up resistors |
Definition at line 348 of file busvoodoo_global.c.
bool busvoodoo_global_actions | ( | char * | actions, |
bool | perform, | ||
bool(*)(const char *action, uint32_t repetition, bool perform) | action_handler | ||
) |
parse and perform actions
[in] | actions | actions to perform |
[in] | perform | the action (true) or just check it (false) |
[in] | action_handler | function handling the individual actions |
Definition at line 410 of file busvoodoo_global.c.
|
static |
set HV step-up voltage regulator voltage
[in] | argument | voltage to set (0 to switch off, NULL to get voltage) |
Definition at line 546 of file busvoodoo_global.c.
|
static |
set lV linear drop-out voltage regulator voltage
[in] | argument | voltage to set (0 to switch off, NULL to get voltage) |
Definition at line 509 of file busvoodoo_global.c.
|
static |
display I/O and RS/CAN connector pinouts
[in] | argument | not used |
Definition at line 582 of file busvoodoo_global.c.
|
static |
switch 3V3 and 5V power rails on/off
[in] | argument | string: "on" to switch on, "off" to switch off, NULL to get status |
Definition at line 475 of file busvoodoo_global.c.
float busvoodoo_hv_set | ( | float | voltage | ) |
set voltage on high voltage adjustable voltage regulator
[in] | voltage | voltage to set on adjustable voltage regulator (0, 3.3-24V) |
Definition at line 318 of file busvoodoo_global.c.
void busvoodoo_led_blue_pulse | ( | uint16_t | ms | ) |
pulse blue LED for short duration
[in] | ms | duration in ms (0-32768) |
Definition at line 372 of file busvoodoo_global.c.
void busvoodoo_led_red_pulse | ( | uint16_t | ms | ) |
pulse red LED for short duration
[in] | ms | duration in ms (0-32768) |
Definition at line 391 of file busvoodoo_global.c.
float busvoodoo_lv_set | ( | float | voltage | ) |
set voltage on low voltage adjustable voltage regulator
[in] | voltage | voltage to set on adjustable voltage regulator (0, 0.3-4.8, 5V) |
Definition at line 290 of file busvoodoo_global.c.
bool busvoodoo_vout_switch | ( | bool | on | ) |
switch 3V3 and 5V power outputs on I/O connector
[in] | on | switch on (true) or off (false) power output |
Definition at line 207 of file busvoodoo_global.c.
float busvoodoo_vreg_get | ( | uint8_t | channel | ) |
read voltage from power rail
[in] | channel | which power rail to read voltage from ADC inputs to measure voltages from voltage regulators |
Definition at line 228 of file busvoodoo_global.c.
char busvoodoo_global_string[64] |
shared string buffer, i.e.
used when configuring modes
Definition at line 66 of file busvoodoo_global.c.