Microchip® Advanced Software Framework

winc1500/iperf_server_example/bsp_app/include/nm_bsp_samd21_app.h File Reference

This module contains SAMD21 BSP APIs declarations.

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

#include <asf.h>
#include "bsp/include/nm_bsp.h"
#include "common/include/nm_common.h"

Macros

#define M2M_PRINTX(x)   nm_bsp_uart_send((const uint8_t *)x,sizeof(x))
 
#define NM_BSP_PERM_FIRMWARE_SIZE   (1024UL*256) /* Permenant storage size available for the firmware */
 
#define NM_BSP_TIME_MSEC   (gu32Jiffies * TICK_RES)
 
#define SW1   NBIT0
 
#define SW2   NBIT1
 
#define TICK_RES   20
 
#define TICK_RES_SLEEP   20 /*it must be equal tick or higher */
 

Typedefs

typedef void(* tpfNmBspBtnPress )(uint8 u8Btn, uint8 u8Type)
 Callback functions. More...
 
typedef void(* tpfNmBspTimerCb )(void)
 

Functions

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)
 

Variables

uint32 gu32Jiffies
 Extern global variables. More...
 
uint32 gu32Jiffies1ms
 Global variables. More...
 

#define M2M_PRINTX (   x)    nm_bsp_uart_send((const uint8_t *)x,sizeof(x))
#define NM_BSP_PERM_FIRMWARE_SIZE   (1024UL*256) /* Permenant storage size available for the firmware */
#define NM_BSP_TIME_MSEC   (gu32Jiffies * TICK_RES)
#define SW1   NBIT0
#define SW2   NBIT1
#define TICK_RES   20

Tick resolution in milliseconds

#define TICK_RES_SLEEP   20 /*it must be equal tick or higher */

typedef void(* tpfNmBspBtnPress)(uint8 u8Btn, uint8 u8Type)

Callback functions.

typedef void(* tpfNmBspTimerCb)(void)

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.

Referenced by IperfIncrementTimerUse().

void nm_bsp_start_configurable_timer ( tpfNmBspTimerCb  pfCb)
void nm_bsp_stop_1ms_timer ( void  )

References NULL, and tstrTimer::pfCb.

Referenced by IperfDecrementTimerUse().

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.

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 
)

uint32 gu32Jiffies

Extern global variables.

Referenced by _tcc_callback_to_change_duty_cycle().

uint32 gu32Jiffies1ms