Microchip® Advanced Software Framework

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

This module contains SAMD21 BSP APIs implementation.

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

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

Data Structures

struct  tstrTimer
 
struct  tstrWakeTimer
 

Macros

#define BSP_MIN(x, y)   ((x)>(y)?(y):(x))
 
#define LONG_PRESS_DEBOUNCE   (1500/TICK_RES)
 
#define SHORT_PRESS_DEBOUNCE   (800/TICK_RES)
 
#define SW1_LINE
 
#define SW1_MUX
 
#define SW1_PIN
 

Functions

static void _tcc_callback_to_change_duty_cycle (struct tcc_module *const module_inst)
 
static void _tcc_configurable_timer_callback (struct tcc_module *const module_inst)
 
static void btn_isr (void)
 
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 gstrTimer
 
static tstrTimer gstrTimer1ms
 
static uint16 gu16Btn1Cnt
 
static uint16 gu16Btn2Cnt
 
uint32 gu32Jiffies
 Extern global variables. More...
 
uint32 gu32Jiffies1ms
 Global variables. More...
 
static uint8 gu8BtnIfg
 
struct tcc_module tcc_instance
 

#define BSP_MIN (   x,
 
)    ((x)>(y)?(y):(x))
#define LONG_PRESS_DEBOUNCE   (1500/TICK_RES)

Referenced by btn_poll().

#define SHORT_PRESS_DEBOUNCE   (800/TICK_RES)

Referenced by btn_poll().

#define SW1_LINE
#define SW1_MUX
#define SW1_PIN

static void _tcc_callback_to_change_duty_cycle ( struct tcc_module *const  module_inst)
static
static void _tcc_configurable_timer_callback ( struct tcc_module *const  module_inst)
static

References tstrTimer::pfCb.

Referenced by configurable_timer_init().

static void btn_isr ( void  )
static
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  )

References M2M_SUCCESS.

void nm_bsp_start_1ms_timer ( tpfNmBspTimerCb  pfCb)

References tstrTimer::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  )

References NULL, and tstrTimer::pfCb.

void nm_bsp_stop_configurable_timer ( void  )
void nm_bsp_stop_timer ( void  )

Start 20ms timer.

Start periodic timer.

Stop 20ms timer.

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

References NULL, and tstrTimer::pfCb.

void nm_bsp_uart_send ( const uint8 pu8Buf,
uint16  u16Sz 
)

struct tcc_module configurable_tcc
tpfNmBspBtnPress gpfBtns
static

Referenced by btn_poll(), and nm_bsp_btn_init().

tstrTimer gstrConfigurableTimer
static
tstrTimer gstrTimer
static
tstrTimer gstrTimer1ms
static
uint16 gu16Btn1Cnt
static

Referenced by btn_poll(), and nm_bsp_btn_init().

uint16 gu16Btn2Cnt
static

Referenced by btn_poll(), and nm_bsp_btn_init().

uint32 gu32Jiffies

Extern global variables.

Referenced by _tcc_callback_to_change_duty_cycle().

uint32 gu32Jiffies1ms

Global variables.

uint8 gu8BtnIfg
static

Referenced by btn_isr(), btn_poll(), and nm_bsp_btn_init().

struct tcc_module tcc_instance