initial commit
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
/*******************************************************************************
|
||||
* @file device_config.h
|
||||
* @brief Device Configuration Management
|
||||
* @author Charles KWON <charleskwon@medithings.co.kr>
|
||||
* @date 2025-01-30
|
||||
* @copyright (c) 2025 Medithings Inc. All rights reserved.
|
||||
*
|
||||
* @details EEPROM configuration loading and default values.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef DEVICE_CONFIG_H
|
||||
#define DEVICE_CONFIG_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/*==============================================================================
|
||||
* CONSTANTS
|
||||
*============================================================================*/
|
||||
|
||||
#define LED_NUM 24 /* Number of LEDs in system */
|
||||
|
||||
/*==============================================================================
|
||||
* EXTERNAL VARIABLES
|
||||
*============================================================================*/
|
||||
|
||||
extern char m_static_passkey[7];
|
||||
extern char SERIAL_NO[16];
|
||||
extern bool bond_data_delete;
|
||||
extern uint8_t m_pd_adc_cnt;
|
||||
extern uint16_t m_pd_delay_us;
|
||||
extern uint32_t m_life_cycle;
|
||||
extern uint16_t led_pd_dac_v[];
|
||||
|
||||
/*==============================================================================
|
||||
* FUNCTION PROTOTYPES
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Load device configuration from EEPROM
|
||||
*/
|
||||
void load_device_configuration(void);
|
||||
|
||||
/**
|
||||
* @brief Load default configuration values
|
||||
*/
|
||||
void load_default_values(void);
|
||||
|
||||
/**
|
||||
* @brief Validate serial number string
|
||||
* @param serial Serial number string
|
||||
* @return true if valid
|
||||
*/
|
||||
bool is_valid_serial_no(const char *serial);
|
||||
|
||||
/**
|
||||
* @brief Validate passkey string
|
||||
* @param passkey Passkey string
|
||||
* @return true if valid
|
||||
*/
|
||||
bool is_valid_passkey(const char *passkey);
|
||||
|
||||
#endif /* DEVICE_CONFIG_H */
|
||||
Reference in New Issue
Block a user