rcc 1.0
RCC - RGB LED Color Cube Documentation
|
Main header file for RCC firmware. More...
#include <avr/io.h>
#include <avr/sleep.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
#include <util/delay.h>
#include "./hal/avr0/system/system.h"
#include "./battery/battery.h"
#include "./led/led.h"
Go to the source code of this file.
Macros | |
#define | F_CPU 20000000UL |
System clock frequency definition. | |
#define | SWITCH PIN7_bm |
Pin mask for the user switch/button input. | |
#define | SWITCH_COMMAND_EXECUTE_MS 3000UL |
Time window to finalize switch command execution in milliseconds. | |
#define | SWITCH_SYSTEM_OFF_TIME_MS 3000UL |
Duration of button press to trigger system shutdown, in milliseconds. | |
#define | COLOR_FADE_DELAY_MS 10UL |
Delay duration for color fading effect in milliseconds. | |
#define | COLOR_INTENSITY_DELAY_MS 350UL |
Delay duration for intensity changes in milliseconds. | |
#define | ENABLE_EEPROM_WRITE |
Enables EEPROM write support. |
Main header file for RCC firmware.
Defines core macros, includes, and configuration constants used throughout the RCC embedded system project. This header provides CPU frequency, switch timing constants, delay intervals, and feature switches. It also includes key AVR libraries and modular headers for system, battery, and LED functionality.
#define COLOR_FADE_DELAY_MS 10UL |
Delay duration for color fading effect in milliseconds.
Controls the time interval between incremental color changes during LED color fading operations.
#define COLOR_INTENSITY_DELAY_MS 350UL |
Delay duration for intensity changes in milliseconds.
Defines the interval timing for changes in LED intensity during brightness adjustment routines.
#define ENABLE_EEPROM_WRITE |
Enables EEPROM write support.
When defined, the firmware supports writing updated LED configuration data to EEPROM. If undefined, EEPROM writes are disabled to protect memory from unnecessary wear.
#define F_CPU 20000000UL |
System clock frequency definition.
This macro defines the operating frequency of the microcontroller's clock in Hertz. It is used by delay functions and timing calculations. The value should match the actual hardware clock frequency to ensure correct timing behavior in the software.
#define SWITCH PIN7_bm |
Pin mask for the user switch/button input.
Defines the bit mask for the hardware input pin connected to the user switch. It is used to detect button press events in the firmware.
#define SWITCH_COMMAND_EXECUTE_MS 3000UL |
Time window to finalize switch command execution in milliseconds.
Defines the maximum duration to wait for button press sequences before executing the corresponding command. Used to handle multi-press functionality within this millisecond timeout.
#define SWITCH_SYSTEM_OFF_TIME_MS 3000UL |
Duration of button press to trigger system shutdown, in milliseconds.
If the user holds the button for this time period, the system initiates a controlled shutdown sequence.