Files
RP2350_MIDI_Lighter/Firmware/EEPROM_M24C64.h
Chris 89c875e38f - First complete version of firmware. Currently being tested in the rehearsal room
- Added bunch of screens, fonts and images
 - Added script to read out frame buffer (function currently disabled in Firmware)
2025-10-26 20:57:58 +01:00

64 lines
1.6 KiB
C

/*
* EEPROM_M24C64.h
*
* Created: Fri Dec 24 2021 12:23:59
* Author Chris
*/
#ifndef EEPROM_M24C64_H_
#define EEPROM_M24C64_H_
// ============================================================================================
// Includes
#include <stdint.h>
#include <stdbool.h>
#include "pico/types.h"
#include "pico/stdlib.h"
#include "pico/binary_info.h"
#include "Command_Definition.h"
// ============================================================================================
// Defines
#define EEPROM_STATUS_NONE 0
#define EEPROM_STATUS_WRITE_OK 1
#define EEPROM_STATUS_WRITE_FAILED 2
// ============================================================================================
// Datatypes
typedef struct {
int32_t Idle_Screen;
int32_t Screen_Timeout;
uint8_t Reverse_List_Scrolling;
uint8_t Use_Color_Correction;
int32_t Current_Threshold;
} __packed Device_Configuration_s;
typedef struct
{
Channel_MIDI_Configuration_s Channel_MIDI_Configuration[NUM_LED_CHANNELS];
Pause_Light_Configuration_s Pause_Light_Configuration[NUM_LED_CHANNELS];
Jam_Light_Configuration_s Jam_Light_Configuration;
Const_Light_Configuration_s Const_Light_Configuration;
Device_Configuration_s Device_Configuration;
} __packed EEPROM_Content_t;
extern volatile EEPROM_Content_t _EEPROM_Content;
// ============================================================================================
// Function Declarations
void EEPROM_Init();
void EEPROM_Tick();
void EEPROM_Trigger_Update();
uint8_t EEPROM_Get_Write_Status();
uint EEPROM_Get_Content_Size();
uint EEPROM_Get_Read_Write_Steps();
#endif /* EEPROM_M24C64_H_ */