116 lines
1.7 KiB
C
116 lines
1.7 KiB
C
/**
|
|
*********************************************************************
|
|
*
|
|
* @file data_table.c
|
|
* @brief Global data table
|
|
*
|
|
* @date 2024-04-14 15:26:43
|
|
* @author CT
|
|
*
|
|
* @details
|
|
*
|
|
*************************************************************************
|
|
**/
|
|
#include <stdint.h>
|
|
|
|
#include "data_types.h"
|
|
#include "data_table.h"
|
|
|
|
// PWR_HOLDEUP
|
|
static digital_t m_pwr_holdup;
|
|
// SD_PWR_ENABLE
|
|
static digital_t m_sd_pwr_enable;
|
|
// Radio_Wakeup
|
|
static digital_t m_radio_wakeup;
|
|
// LED
|
|
static digital_t m_led;
|
|
// RAM_CE
|
|
static digital_t m_ram_ce;
|
|
// SD_CE
|
|
static digital_t m_sd_ce;
|
|
// BAT_V
|
|
static uint32_t m_bat_v;
|
|
|
|
// PWR_HOLDEUP
|
|
// Get
|
|
uint32_t app_get_pwr_holdup(void)
|
|
{
|
|
return (m_pwr_holdup.state);
|
|
}
|
|
// Set
|
|
void app_set_pwr_holdup(uint32_t val)
|
|
{
|
|
m_pwr_holdup.state = val;
|
|
}
|
|
|
|
// SD_PWR_ENABLE
|
|
// Get
|
|
uint32_t app_get_sd_pwr_enable(void)
|
|
{
|
|
return(m_sd_pwr_enable.state);
|
|
}
|
|
//Set
|
|
void app_set_sd_pwr_enable(uint32_t val)
|
|
{
|
|
m_sd_pwr_enable.state = val;
|
|
}
|
|
|
|
// Radio_Wakeup
|
|
// Get
|
|
uint32_t app_get_radio_wakeup(void)
|
|
{
|
|
return (m_radio_wakeup.state);
|
|
}
|
|
// Set
|
|
void app_set_radio_wakeup(uint32_t val)
|
|
{
|
|
m_radio_wakeup.state = val;
|
|
}
|
|
|
|
// LED
|
|
// Get
|
|
uint32_t app_get_led(void)
|
|
{
|
|
return (m_led.state);
|
|
}
|
|
// Set
|
|
void app_set_led(uint32_t val)
|
|
{
|
|
m_led.state = val;
|
|
}
|
|
|
|
// RAM_CE
|
|
// Get
|
|
uint32_t app_get_ram_ce(void)
|
|
{
|
|
return (m_ram_ce.state);
|
|
}
|
|
// Set
|
|
void app_set_ram_ce(uint32_t val)
|
|
{
|
|
m_ram_ce.state = val;
|
|
}
|
|
|
|
// SD_CE
|
|
// Get
|
|
uint32_t app_get_sd_ce(void)
|
|
{
|
|
return (m_sd_ce.state);
|
|
}
|
|
// Set
|
|
void app_set_sd_ce(uint32_t val)
|
|
{
|
|
m_sd_ce.state = val;
|
|
}
|
|
|
|
// BAT_V
|
|
// Get
|
|
uint32_t app_get_bat_v(void)
|
|
{
|
|
return (m_bat_v);
|
|
}
|
|
// Set
|
|
void app_set_bat_v(uint32_t val)
|
|
{
|
|
m_bat_v = val;
|
|
} |