Files
RP2350_MIDI_Lighter/Firmware/EEPROM_M24C64.h
Chris 128d42c586 - Fixed drawing of round objects (Circles, Rounded Rects) using a lookup table
- Added function to read out the display_buffer via USB-Serial
 - Added basic structure and files for later complete firmware (still in progress)
 - Added Doc folder with schematic in it
 - Added Python script and batch file to read out the display buffer and open the image in gimp
2025-09-07 08:55:39 +02:00

65 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 {
uint8_t Idle_Screen;
uint Screen_Timeout;
uint8_t Reverse_List_Scrolling;
uint8_t Transition_Type;
uint8_t Transition_Frames;
uint8_t Use_Color_Correction;
} __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_ */