Microchip® Advanced Software Framework

winc1500/iperf_server_example/bsp_app/source/nm_bsp_sam4s_app.c File Reference

This module contains SAM4S BSP APIs implementation.

Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include "bsp_app/include/nm_bsp_sam4s_app.h"
#include "common/include/nm_common.h"

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_TIME   (1500/TICK_RES)
 
#define SW1_LINE
 
#define SW1_MUX
 
#define SW1_PIN
 

Typedefs

typedef void(* tick_timer_cb_t )(void)
 

Functions

static void _tcc_callback_to_change_duty_cycle (void)
 
static void _tcc_configurable_timer_callback (struct tcc_module *const module_inst)
 
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)
 
void SysTick_Handler (void)
 
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
 
static uint16 gu16Btn2Cnt
 
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,
 
)    ((x)>(y)?(y):(x))
#define DEBOUNCE_TIME   (40/TICK_RES)
#define LONG_PRESS_TIME   (1500/TICK_RES)
#define SW1_LINE
#define SW1_MUX
#define SW1_PIN

typedef void(* tick_timer_cb_t)(void)

static void _tcc_configurable_timer_callback ( struct tcc_module *const  module_inst)
static

References tstrTimer::pfCb.

static void btn_poll ( void  )
static

Static functions.

static void configurable_timer_init ( uint32_t  u32Period)
static
void nm_bsp_app_configurable_timer_init ( uint32_t  u32Period)
sint8 nm_bsp_app_deinit ( void  )
sint8 nm_bsp_app_init ( void  )

Referenced by main().

void nm_bsp_btn_init ( tpfNmBspBtnPress  pfBtnCb)

Referenced by app_main().

void nm_bsp_start_1ms_timer ( tpfNmBspTimerCb  pfCb)

Referenced by IperfIncrementTimerUse().

void nm_bsp_start_configurable_timer ( tpfNmBspTimerCb  pfCb)
void nm_bsp_stop_1ms_timer ( void  )

Referenced by IperfDecrementTimerUse().

void nm_bsp_stop_configurable_timer ( void  )
nm_bsp_stop_timer ( void  )

Start 20ms timer.

Stop 20ms timer.

Author
M.S.M
Date
28 OCT 2013
Version
1.0
Author
M.S.M
Date
28 oct 2013
Version
1.0
1.0

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().

void nm_bsp_uart_send ( const uint8 pu8Buf,
uint16  u16Sz 
)
void SysTick_Handler ( void  )

References ms_ticks, and tick_timer_cb.

static void timer0_init ( void  )
static

struct tcc_module configurable_tcc
tpfNmBspBtnPress gpfBtns
static
tstrTimer gstrConfigurableTimer
static
tstrTimer gstrTimer1ms
static
tstrTimer gstrTimer20ms
static
uint16 gu16Btn1Cnt
static
uint16 gu16Btn2Cnt
static

Referenced by btn_poll().

uint32 gu32Jiffies1ms

Global variables.

uint32 gu32Jiffies20ms

Extern global variables.

Referenced by _tcc_callback_to_change_duty_cycle().

uint8 gu8BtnIfg
static
volatile uint32_t ms_ticks = 0

Referenced by SysTick_Handler().

struct tcc_module tcc_instance
tick_timer_cb_t tick_timer_cb = NULL
static

Referenced by SysTick_Handler(), and timer0_init().