This module contains SAME70 BSP APIs implementation.
Copyright (c) 2018-2019 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | tcc_module |
struct | tstrTimer |
struct | tstrWakeTimer |
Macros | |
#define | BSP_MIN(x, y) ((x)>(y)?(y):(x)) |
#define | DEBOUNCE_TIME (40/TICK_RES) |
#define | LONG_PRESS_DEBOUNCE (1500/TICK_RES) |
#define | LONG_PRESS_TIME (1500/TICK_RES) |
#define | SHORT_PRESS_DEBOUNCE (800/TICK_RES) |
#define | SW1_LINE |
#define | SW1_MUX |
#define | SW1_PIN |
#define | PIN_PUSHBUTTON_WAKEUP_PIO PIOA |
Push button definitions for sleep mode and active mode. More... | |
#define | PIN_PUSHBUTTON_WAKEUP_MASK PIO_PA11 |
#define | PIN_PUSHBUTTON_WAKEUP_ID ID_PIOA |
#define | PIN_PUSHBUTTON_WAKEUP_ATTR PIO_DEFAULT |
Typedefs | |
typedef void(* | tick_timer_cb_t )(void) |
Functions | |
static void | _tcc_callback_to_change_duty_cycle (void) |
static void | btn_isr (uint32 ul_id, uint32 ul_mask) |
static void | btn_poll (void) |
Static functions. More... | |
static void | configurable_timer_init (uint32_t u32Period) |
void | nm_bsp_app_configurable_timer_init (uint32_t u32Period) |
sint8 | nm_bsp_app_deinit (void) |
sint8 | nm_bsp_app_init (void) |
void | nm_bsp_btn_init (tpfNmBspBtnPress pfBtnCb) |
void | nm_bsp_start_1ms_timer (tpfNmBspTimerCb pfCb) |
void | nm_bsp_start_configurable_timer (tpfNmBspTimerCb pfCb) |
void | nm_bsp_start_timer (tpfNmBspTimerCb pfCb, uint32 u32Period) |
void | nm_bsp_stop_1ms_timer (void) |
void | nm_bsp_stop_configurable_timer (void) |
void | nm_bsp_stop_timer (void) |
Start 20ms timer. More... | |
void | nm_bsp_uart_send (const uint8 *pu8Buf, uint16 u16Sz) |
static void | timer0_init (void) |
Variables | |
struct tcc_module | configurable_tcc |
static tpfNmBspBtnPress | gpfBtns |
static tstrTimer | gstrConfigurableTimer |
static tstrTimer | gstrTimer1ms |
static tstrTimer | gstrTimer20ms |
static uint16 | gu16Btn1Cnt |
uint32 | gu32Jiffies1ms |
Global variables. More... | |
uint32 | gu32Jiffies20ms |
Extern global variables. More... | |
static uint8 | gu8BtnIfg |
volatile uint32_t | ms_ticks = 0 |
struct tcc_module | tcc_instance |
static tick_timer_cb_t | tick_timer_cb = NULL |
#define BSP_MIN | ( | x, | |
y | |||
) | ((x)>(y)?(y):(x)) |
Referenced by spi_flash_write().
#define DEBOUNCE_TIME (40/TICK_RES) |
#define LONG_PRESS_DEBOUNCE (1500/TICK_RES) |
Referenced by btn_poll().
#define LONG_PRESS_TIME (1500/TICK_RES) |
#define PIN_PUSHBUTTON_WAKEUP_ATTR PIO_DEFAULT |
Referenced by nm_bsp_btn_init().
#define PIN_PUSHBUTTON_WAKEUP_ID ID_PIOA |
Referenced by nm_bsp_btn_init().
#define PIN_PUSHBUTTON_WAKEUP_MASK PIO_PA11 |
Referenced by nm_bsp_btn_init().
#define PIN_PUSHBUTTON_WAKEUP_PIO PIOA |
Push button definitions for sleep mode and active mode.
Referenced by nm_bsp_btn_init().
#define SHORT_PRESS_DEBOUNCE (800/TICK_RES) |
Referenced by btn_poll().
#define SW1_LINE |
#define SW1_MUX |
#define SW1_PIN |
typedef void(* tick_timer_cb_t)(void) |
|
static |
References btn_poll(), gu32Jiffies1ms, gu32Jiffies20ms, NM_BSP_TIME_MSEC, tstrTimer::pfCb, tstrWakeTimer::strTimer, TICK_RES, TICK_RES_SLEEP, tstrTimer::u32Period, tstrTimer::u32Timeout, and tstrWakeTimer::u8Enabled.
Referenced by timer0_init().
References gu8BtnIfg, and SW1.
Referenced by nm_bsp_btn_init().
|
static |
Static functions.
References gpfBtns, gu16Btn1Cnt, gu8BtnIfg, ioport_get_pin_level(), LONG_PRESS_DEBOUNCE, SHORT_PRESS_DEBOUNCE, SW1, and SW2.
Referenced by _tcc_callback_to_change_duty_cycle().
|
static |
Referenced by nm_bsp_app_configurable_timer_init().
void nm_bsp_app_configurable_timer_init | ( | uint32_t | u32Period | ) |
References configurable_timer_init().
sint8 nm_bsp_app_deinit | ( | void | ) |
References M2M_SUCCESS.
sint8 nm_bsp_app_init | ( | void | ) |
References M2M_SUCCESS, NULL, tstrTimer::pfCb, tstrWakeTimer::strTimer, timer0_init(), tstrTimer::u32Period, tstrTimer::u32Timeout, and tstrWakeTimer::u8Enabled.
Referenced by main().
void nm_bsp_btn_init | ( | tpfNmBspBtnPress | pfBtnCb | ) |
References btn_isr(), gpfBtns, PIN_PUSHBUTTON_WAKEUP_ATTR, PIN_PUSHBUTTON_WAKEUP_ID, PIN_PUSHBUTTON_WAKEUP_MASK, PIN_PUSHBUTTON_WAKEUP_PIO, pio_enable_interrupt(), and pio_set_debounce_filter().
Referenced by app_main().
void nm_bsp_start_1ms_timer | ( | tpfNmBspTimerCb | pfCb | ) |
References tstrTimer::pfCb.
Referenced by IperfIncrementTimerUse().
void nm_bsp_start_configurable_timer | ( | tpfNmBspTimerCb | pfCb | ) |
void nm_bsp_start_timer | ( | tpfNmBspTimerCb | pfCb, |
uint32 | u32Period | ||
) |
References NM_BSP_TIME_MSEC, tstrTimer::pfCb, tstrTimer::u32Period, and tstrTimer::u32Timeout.
Referenced by app_ble_wifi_provisioning(), ble_bat_handle_paired_event(), ble_heart_rate_handle_paired_event(), and led_flash().
void nm_bsp_stop_1ms_timer | ( | void | ) |
References NULL, and tstrTimer::pfCb.
Referenced by IperfDecrementTimerUse().
void nm_bsp_stop_configurable_timer | ( | void | ) |
nm_bsp_stop_timer | ( | void | ) |
Start 20ms timer.
Stop 20ms timer.
References NULL, and tstrTimer::pfCb.
Referenced by app_ble_wifi_provisioning(), ble_bat_handle_disconnect_event(), ble_bat_handle_paired_event(), ble_heart_rate_handle_disconnect_event(), ble_heart_rate_handle_paired_event(), led_clear(), led_flash(), and wifi_connect_timeout().
|
static |
References _tcc_callback_to_change_duty_cycle(), and tick_timer_cb.
Referenced by nm_bsp_app_init().
struct tcc_module configurable_tcc |
|
static |
Referenced by btn_poll(), and nm_bsp_btn_init().
|
static |
|
static |
|
static |
|
static |
Referenced by btn_poll().
uint32 gu32Jiffies1ms |
Global variables.
Referenced by _tcc_callback_to_change_duty_cycle(), platform_cmd_cmpl_wait(), and platform_event_wait().
uint32 gu32Jiffies20ms |
Extern global variables.
Referenced by _tcc_callback_to_change_duty_cycle().
|
static |
Referenced by btn_isr(), and btn_poll().
volatile uint32_t ms_ticks = 0 |
struct tcc_module tcc_instance |
|
static |
Referenced by timer0_init().