Macros | |
#define | BOARD_NAME_TOKEN_COUNT 1 |
#define | BOARD_REVISION_NUMBER_TOKEN_COUNT 2 |
#define | BOARD_SERIAL_NUMBER_TOKEN_COUNT 3 |
#define | EDBG_ADDRESS 0x28; |
EDBG TWI interface address. More... | |
#define | EDBG_EXTEN_BOARDS_TOKEN 0xE1; |
Request token of EDBG TWI information interface. More... | |
#define | MANUFACTURE_TOKEN_COUNT 0 |
#define | SD_FILE_KEY_CIK_CODE "cik_key" |
#define | SETTING_FILE_PATH "/settings.ini" |
Functions | |
static bool | _decode_board_info (uint8_t *buffer) |
static void | _lightsensor_init () |
intialize light sensor More... | |
static bool | _load_setting_from_sd (void) |
static bool | _save_setting_to_sd (void) |
static void | _sd_init (void) |
io1_board_info * | io1_board_get_info () |
int | io1_board_get_lightvalue () |
int | io1_board_get_temperature () |
bool | io1_board_init () |
void | io1_board_prepare_to_get_info () |
void | io1_board_reset_cik_value () |
bool | io1_board_save_cik_value_to_sd (char *pbuf) |
void | io1_board_set_led (bool on) |
char * | LTRIM (char *p) |
Remove leading white-space characters from the string. More... | |
char * | RTRIM (char *p) |
Remove trailing white-space characters from the string. More... | |
char * | TRIM (char *p) |
Remove both leading and trailing white-space characters from the string. More... | |
Variables | |
struct adc_module | adc_instance |
Support and FAQ: visit Microchip Support More... | |
struct i2c_master_module | dev_inst_at30tse75x |
FATFS | fs |
static io1_board_info | g_info |
const char * | sec_type_values [] |
#define BOARD_NAME_TOKEN_COUNT 1 |
Referenced by _decode_board_info().
#define BOARD_REVISION_NUMBER_TOKEN_COUNT 2 |
Referenced by _decode_board_info().
#define BOARD_SERIAL_NUMBER_TOKEN_COUNT 3 |
Referenced by _decode_board_info().
#define EDBG_ADDRESS 0x28; |
EDBG TWI interface address.
Referenced by io1_board_get_info().
#define EDBG_EXTEN_BOARDS_TOKEN 0xE1; |
Request token of EDBG TWI information interface.
Referenced by io1_board_get_info().
#define MANUFACTURE_TOKEN_COUNT 0 |
Referenced by _decode_board_info().
#define SD_FILE_KEY_CIK_CODE "cik_key" |
Referenced by _load_setting_from_sd(), and _save_setting_to_sd().
#define SETTING_FILE_PATH "/settings.ini" |
Referenced by _load_setting_from_sd(), and _save_setting_to_sd().
|
static |
References _io1_board_info::board_id, BOARD_NAME_TOKEN_COUNT, BOARD_REVISION_NUMBER_TOKEN_COUNT, BOARD_SERIAL_NUMBER_TOKEN_COUNT, _io1_board_info::board_sn, _io1_board_info::board_vendor, DEBUG, DEBUG_CONF_IO1_BOARD, DEBUG_EOL, extension_info, MANUFACTURE_TOKEN_COUNT, and NULL.
Referenced by io1_board_get_info().
|
static |
intialize light sensor
References adc_enable(), adc_get_config_defaults(), adc_init(), and adc_instance.
Referenced by io1_board_init().
|
static |
References _io1_board_info::cik, DEBUG, DEBUG_CONF_IO1_BOARD, DEBUG_EOL, f_gets(), f_open(), FA_READ, FR_OK, _io1_board_info::is_activate, key, NULL, ptr, SD_FILE_KEY_CIK_CODE, SETTING_FILE_PATH, strncpy(), and TRIM().
Referenced by io1_board_get_info().
|
static |
References _io1_board_info::cik, DEBUG, DEBUG_CONF_IO1_BOARD, DEBUG_EOL, f_close(), f_open(), f_printf(), FA_CREATE_ALWAYS, FA_WRITE, FR_OK, SD_FILE_KEY_CIK_CODE, and SETTING_FILE_PATH.
Referenced by io1_board_save_cik_value_to_sd().
|
static |
References DEBUG, DEBUG_CONF_IO1_BOARD, DEBUG_EOL, f_mount(), FR_OK, ret, sd_mmc_check(), SD_MMC_ERR_NO_CARD, sd_mmc_init(), sd_mmc_spi_init(), and sd_mmc_spi_select_device().
Referenced by io1_board_init().
io1_board_info* io1_board_get_info | ( | void | ) |
Send the request token
Get the extension boards info
Check and show info
show extension board info
References _decode_board_info(), _load_setting_from_sd(), i2c_master_packet::address, i2c_master_packet::data, i2c_master_packet::data_length, DEBUG, DEBUG_CONF_IO1_BOARD, DEBUG_EOL, dev_inst_at30tse75x, EDBG_ADDRESS, EDBG_EXTEN_BOARDS_TOKEN, extension_map, g_info, i2c_master_packet::high_speed, i2c_master_packet::hs_master_code, i, i2c_master_read_packet_wait(), i2c_master_write_packet_wait_no_stop(), j, NULL, read_buffer, STATUS_OK, and i2c_master_packet::ten_bit_address.
Referenced by main().
int io1_board_get_lightvalue | ( | void | ) |
References adc_instance, adc_read(), DEBUG, DEBUG_CONF_IO1_BOARD, DEBUG_EOL, and STATUS_OK.
Referenced by main().
int io1_board_get_temperature | ( | void | ) |
References at30tse_read_temperature().
Referenced by main().
bool io1_board_init | ( | void | ) |
References _lightsensor_init(), _sd_init(), at30tse_init(), port_config::direction, port_get_config_defaults(), PORT_PIN_DIR_OUTPUT, and port_pin_set_config().
Referenced by main().
void io1_board_prepare_to_get_info | ( | void | ) |
References adc_instance, and adc_start_conversion().
Referenced by main().
void io1_board_reset_cik_value | ( | void | ) |
References _io1_board_info::cik, and _io1_board_info::is_activate.
Referenced by parsing_http_response_data().
bool io1_board_save_cik_value_to_sd | ( | char * | pbuf | ) |
References _save_setting_to_sd(), _io1_board_info::cik, and _io1_board_info::is_activate.
Referenced by parsing_http_response_data().
void io1_board_set_led | ( | bool | on | ) |
References port_pin_set_output_level().
Referenced by parsing_http_response_data().
char * LTRIM | ( | char * | p | ) |
char * RTRIM | ( | char * | p | ) |
char * TRIM | ( | char * | p | ) |
Remove both leading and trailing white-space characters from the string.
[in] | p | the string to be trimmed |
References LTRIM(), and RTRIM().
Referenced by _load_setting_from_sd().
struct adc_module adc_instance |
Support and FAQ: visit Microchip Support
Support and FAQ: visit Microchip Support
Support and FAQ: visit Microchip Support
[adc_module_inst]
struct i2c_master_module dev_inst_at30tse75x |
FATFS fs |
Referenced by chk_mounted(), f_mount(), and main().
|
static |
Referenced by io1_board_get_info().
const char* sec_type_values[] |