Move variables to CCM RAM

This commit is contained in:
2020-08-23 21:51:34 +02:00
parent 149c5715c6
commit cc6e922d1b
2 changed files with 11 additions and 9 deletions

View File

@@ -28,6 +28,7 @@
#include <reflow-controller/systick.h>
#include <stm-periph/clock-enable-manager.h>
#include <stm-periph/stm32-gpio-macros.h>
#include <helper-macros/helper-macros.h>
#include <stdbool.h>
#include <string.h>
@@ -149,7 +150,7 @@ static void lcd_command(uint8_t data)
// Set DD RAM Address --------- 0b1xxxxxxx (Display Data RAM)
#define LCD_SET_DDADR 0x80
static char __attribute__((section(".ccm.bss"))) shadow_display[4][21];
static char IN_SECTION(.ccm.bss) shadow_display[4][21];
void lcd_clear(void)
{
@@ -347,13 +348,13 @@ static void lcd_fsm_write_data(bool high, uint8_t data)
enum lcd_fsm_ret lcd_fsm_write_buffer(const char (*display_buffer)[21])
{
static bool idle = true;
static uint8_t rows_to_handle = 0;
static uint32_t state_cnt;
static uint8_t row_cnt = 0;
static uint32_t char_cnt;
static uint32_t line_len;
static uint64_t timestamp = 0ULL;
static bool IN_SECTION(.ccm.data) idle = true;
static uint8_t IN_SECTION(.ccm.bss) rows_to_handle = 0;
static uint32_t IN_SECTION(.ccm.bss) state_cnt;
static uint8_t IN_SECTION(.ccm.bss) row_cnt = 0;
static uint32_t IN_SECTION(.ccm.bss) char_cnt;
static uint32_t IN_SECTION(.ccm.bss) line_len;
static uint64_t IN_SECTION(.ccm.bss) timestamp = 0ULL;
enum lcd_fsm_ret ret;
ret = LCD_FSM_NOP;