CuVoodoo STM32F1 firmware template
Functions | Variables
application.c File Reference

STM32F1 BusVoodoo application. More...

Go to the source code of this file.

Functions

size_t putc (char c)
 print a single character on user output More...
 
static void switch_mode (struct busvoodoo_mode_t *mode)
 switch BusVoddoo mode More...
 
static void command_help (void *argument)
 command to show help More...
 
static void command_mode (void *argument)
 command to select mode More...
 
static void command_quit (void *argument)
 command to quit current BusVoodoo mode More...
 
static void command_reset (void *argument)
 command to reset board More...
 
static void process_command (char *str)
 process user command More...
 
void main (void)
 program entry point this is the firmware function started by the micro-controller
 

Variables

static struct busvoodoo_mode_tbusvoodoo_modes []
 all supported BusVoodoo modes More...
 
static struct busvoodoo_mode_tbusvoodoo_mode = NULL
 current BusVoodoo mode
 
static bool busvoodoo_mode_complete = false
 is mode setup complete
 
static const struct menu_command_t menu_commands []
 command to reboot into bootloader More...
 

Detailed Description

STM32F1 BusVoodoo application.

Author
King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info
Date
2016-2018

Definition in file application.c.

Function Documentation

◆ command_help()

static void command_help ( void *  argument)
static

command to show help

Parameters
[in]argumentno argument required

Definition at line 160 of file application.c.

◆ command_mode()

static void command_mode ( void *  argument)
static

command to select mode

Parameters
[in]argumentmode to select

Definition at line 169 of file application.c.

◆ command_quit()

static void command_quit ( void *  argument)
static

command to quit current BusVoodoo mode

Parameters
[in]argumentno argument required

Definition at line 191 of file application.c.

◆ command_reset()

static void command_reset ( void *  argument)
static

command to reset board

Parameters
[in]argumentno argument required

Definition at line 197 of file application.c.

◆ process_command()

static void process_command ( char *  str)
static

process user command

Parameters
[in]struser command string (\0 ended)

Definition at line 207 of file application.c.

◆ putc()

size_t putc ( char  c)

print a single character on user output

Warning
this must be implemented by the user (using the desired output interface)
Parameters
[in]ccharacter to be printed
Returns
number of characters printed

Definition at line 58 of file application.c.

◆ switch_mode()

static void switch_mode ( struct busvoodoo_mode_t mode)
static

switch BusVoddoo mode

Parameters
[in]modemode to switch to

Definition at line 79 of file application.c.

Variable Documentation

◆ busvoodoo_modes

struct busvoodoo_mode_t* busvoodoo_modes[]
static
Initial value:
= {
}
struct busvoodoo_mode_t busvoodoo_i2c_mode
I2C mode interface definition.
struct busvoodoo_mode_t busvoodoo_hiz_mode
HiZ mode interface definition.
struct busvoodoo_mode_t busvoodoo_spi_mode
SPI mode interface definition.
struct busvoodoo_mode_t busvoodoo_uart_mode
UART mode interface definition.

all supported BusVoodoo modes

Definition at line 46 of file application.c.

◆ menu_commands

const struct menu_command_t menu_commands[]
static

command to reboot into bootloader

Parameters
[in]argumentno argument requiredlist of all supported commands

Definition at line 125 of file application.c.