Header file for the Legacy HAL.
License#
Copyright 2019 Silicon Laboratories, Inc, www.silabs.com
The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.
/***************************************************************************/
#ifndef HAL_H
#define HAL_H
#if defined(TOKEN_MANAGER_TEST) || defined(SL_TOKEN_MANAGER_COMPATIBILITY)
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#else // TOKEN_MANAGER_TEST || SL_TOKEN_MANAGER_COMPATIBILITY
#ifndef EZSP_HOST
#include "sl_zigbee.h"
#endif
#endif // TOKEN_MANAGER_TEST || SL_TOKEN_MANAGER_COMPATIBILITY
#include "micro.h"
#include "serial.h"
#include "led.h"
#include "button.h"
#include "crc.h"
#include "random.h"
#if defined(SL_CATALOG_TOKEN_MANAGER_PRESENT) && !defined(SL_ZIGBEE_TEST)
#if !defined(EZSP_HOST) && !defined(SL_ZIGBEE_TEST) && !defined(ZIGBEE_STACK_ON_HOST)
#include "sl_token_api.h"
#else
#include "token.h"
#endif
#endif
#ifdef CORTEXM3
#include "cortexm3/diagnostic.h"
#endif
#define SECURITY_BLOCK_SIZE 16 // in bytes
/***************************************************************************/
#ifndef SL_ZIGBEE_TEST
#define simulatedTimePasses()
#else
void simulatedTimePasses(void);
#endif // SL_ZIGBEE_TEST
uint16_t halCommonGetInt16uMillisecondTick(void);
uint32_t halCommonGetInt32uMillisecondTick(void);
uint64_t halCommonGetInt64uMillisecondTick(void);
uint16_t halCommonGetInt16uQuarterSecondTick(void);
uint16_t halInternalStartSystemTimer(void);
void halCommonDelayMicroseconds(uint16_t us);
void halCommonDelayMilliseconds(uint16_t ms);
sl_status_t halCommonIdleForMilliseconds(uint32_t *duration);
void halStackSymbolDelayAIsr(void);
void halStackProcessBootCount(void);
sl_status_t sli_util_debug_init(void);
void sli_802154phy_radio_seed_random(void);
#endif // HAL_H
Functions#
This function will get 16u ms tick data.
This function will get 32u ms tick data.
This function will get 64u ms tick data.
This function will get 16u quater second tick data.
This function will start system timer.
This function will delay an amount of time in us.
This function will delay an amount of time in ms.
This function will set state to idle for an amount of time in ms.
This function is halStackSymbolDelayAIsr.
This function is halStackProcessBootCount.
This function is sli_util_debug_init.
This function is sli_802154phy_radio_seed_random.
Function Documentation#
halCommonGetInt16uMillisecondTick#
uint16_t halCommonGetInt16uMillisecondTick (void )
This function will get 16u ms tick data.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
halCommonGetInt32uMillisecondTick#
uint32_t halCommonGetInt32uMillisecondTick (void )
This function will get 32u ms tick data.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
halCommonGetInt64uMillisecondTick#
uint64_t halCommonGetInt64uMillisecondTick (void )
This function will get 64u ms tick data.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
halCommonGetInt16uQuarterSecondTick#
uint16_t halCommonGetInt16uQuarterSecondTick (void )
This function will get 16u quater second tick data.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
halInternalStartSystemTimer#
uint16_t halInternalStartSystemTimer (void )
This function will start system timer.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
halCommonDelayMicroseconds#
void halCommonDelayMicroseconds (uint16_t us)
This function will delay an amount of time in us.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint16_t | N/A | us | second in us |
halCommonDelayMilliseconds#
void halCommonDelayMilliseconds (uint16_t ms)
This function will delay an amount of time in ms.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint16_t | N/A | ms | second in ms |
halCommonIdleForMilliseconds#
sl_status_t halCommonIdleForMilliseconds (uint32_t * duration)
This function will set state to idle for an amount of time in ms.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t * | N/A | duration | second in us |
Returns
sl_status_t
halStackSymbolDelayAIsr#
void halStackSymbolDelayAIsr (void )
This function is halStackSymbolDelayAIsr.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
halStackProcessBootCount#
void halStackProcessBootCount (void )
This function is halStackProcessBootCount.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sli_util_debug_init#
sl_status_t sli_util_debug_init (void )
This function is sli_util_debug_init.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Returns
sl_status_t
sli_802154phy_radio_seed_random#
void sli_802154phy_radio_seed_random (void )
This function is sli_802154phy_radio_seed_random.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |