Move all firmware files to subdirectory
This commit is contained in:
6
firmware/main/CMakeLists.txt
Normal file
6
firmware/main/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
idf_component_register(
|
||||
SRCS "main.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES
|
||||
buttons console_wrapper display settings sound system_utils time wifi
|
||||
)
|
||||
48
firmware/main/Kconfig.projbuild
Normal file
48
firmware/main/Kconfig.projbuild
Normal file
@@ -0,0 +1,48 @@
|
||||
menu "Bedside clock settings"
|
||||
menu "Default settings"
|
||||
config DEFAULT_HOSTNAME
|
||||
string "Default hostname"
|
||||
default "bedside-clock"
|
||||
config DEFAULT_SSID
|
||||
string "SSID of default WiFi network"
|
||||
default ""
|
||||
config DEFAULT_PSK
|
||||
string "PSK for default WiFi network"
|
||||
default ""
|
||||
config DEFAULT_TIMEZONE
|
||||
string "Default timezone (TZ format)"
|
||||
default "UTCUTC-1,M3.5.0/1,M10.5.0/2"
|
||||
config DEFAULT_SNTP_SERVER
|
||||
string "Default SNTP server domain"
|
||||
default "pool.ntp.org"
|
||||
endmenu
|
||||
menu "Alert sound options"
|
||||
config ALERT_FREQ
|
||||
int "Frequency (in Hz) of the alert sound"
|
||||
default 400
|
||||
config ALERT_AMPLITUDE
|
||||
int "Amplitude (0 to 255) of the alert sound"
|
||||
default 180
|
||||
config ALERT_TOGGLE_PERIOD_MS
|
||||
int "Toggle period of alert sound in milliseconds"
|
||||
default 300
|
||||
endmenu
|
||||
config ALERT_MINUTES
|
||||
int "Number of minutes before alarm turned off automatically"
|
||||
default 2
|
||||
config SNOOZE_MINUTES
|
||||
int "Number of minutes to snooze alarms for"
|
||||
default 5
|
||||
config WIFI_MAX_RETRIES
|
||||
int "Maximum number of times to retry connecting to WiFi network"
|
||||
default 10
|
||||
config TIME_SAVE_PERIOD_MS
|
||||
int "How often (in ms) to save the time to persistent storage"
|
||||
default 60000
|
||||
config DEFAULT_TASK_STACK
|
||||
int "Default task stack size (in words)"
|
||||
default 4096
|
||||
config MAX_ALARMS
|
||||
int "Maximum number of alarms"
|
||||
default 16
|
||||
endmenu
|
||||
28
firmware/main/main.c
Normal file
28
firmware/main/main.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
* Copyright (c) Camden Dixie O'Brien
|
||||
*/
|
||||
|
||||
#include "alarms.h"
|
||||
#include "buttons.h"
|
||||
#include "console.h"
|
||||
#include "display.h"
|
||||
#include "settings.h"
|
||||
#include "sound.h"
|
||||
#include "system_utils.h"
|
||||
#include "time_manager.h"
|
||||
#include "wifi.h"
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
early_init();
|
||||
|
||||
console_init();
|
||||
settings_init();
|
||||
wifi_init();
|
||||
time_manager_init();
|
||||
display_init();
|
||||
sound_init();
|
||||
alarms_init();
|
||||
buttons_init();
|
||||
}
|
||||
Reference in New Issue
Block a user