BV: add global shared string buffer to save RAM

This commit is contained in:
King Kévin 2018-03-15 18:54:45 +01:00
parent 06664a3916
commit 56168c6c0c
2 changed files with 6 additions and 2 deletions

View File

@ -62,6 +62,7 @@ const uint8_t busvoodoo_io_groups[13] = {6, 6, 4, 4, 1, 1, 5, 5, 2, 2, 3, 3, 3};
bool busvoodoo_full = false;
char busvoodoo_version = '0';
char busvoodoo_global_string[64];
void busvoodoo_setup(void)
{
@ -359,9 +360,9 @@ static void busvoodoo_led_update(void)
if (busvoodoo_global_led_blue && busvoodoo_global_led_red) { // both LEDs should be on
led_blink(0.01, 0.5); // enable both LEDs (alternating at 100Hz)
} else if (busvoodoo_global_led_blue) { // only blue LED should be on
led_blink(0, 1); // enable only blue LED
led_blue(); // enable only blue LED
} else if (busvoodoo_global_led_red) { // only red LED should be on
led_blink(0, 0); // enable only red LED
led_red(); // enable only red LED
} else { // no LED should be on
led_off(); // disable both LEDs
}

View File

@ -135,6 +135,9 @@ extern const char* busvoodoo_global_pinout_io[10];
/** RS/CAN connector pinout */
extern const char* busvoodoo_global_pinout_rscan[5];
/** shared string buffer, i.e. used when configuring modes */
extern char busvoodoo_global_string[64];
/** setup BusVoodoo board */
void busvoodoo_setup(void);
/** set safe state by disabling all outputs */