m2m_hif.h
Go to the documentation of this file.
1 
35 #ifndef _M2M_HIF_
36 #define _M2M_HIF_
37 
38 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
39 INCLUDES
40 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
41 
44 #ifdef ENABLE_UNO_BOARD
45 #include "m2m_uno_hif.h"
46 #endif
47 
48 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
49 MACROS
50 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
51 
52 #define M2M_HIF_MAX_PACKET_SIZE (1600 - 4)
53 
56 #define M2M_HIF_HDR_OFFSET (sizeof(tstrHifHdr) + 4)
57 
58 
63 typedef struct
64 {
68 }tstrHifHdr;
69 
70 #ifdef __cplusplus
71  extern "C" {
72 #endif
73 
86 typedef void (*tpfHifCallBack)(uint8 u8OpCode, uint16 u16DataSize, uint32 u32Addr);
96 NMI_API sint8 hif_init(void * arg);
106 NMI_API sint8 hif_deinit(void * arg);
134 sint8 hif_check_code(uint8 u8Gid, uint8 u8OpCode);
156 NMI_API sint8 hif_send(uint8 u8Gid,uint8 u8Opcode,uint8 *pu8CtrlBuf,uint16 u16CtrlBufSize,
157  uint8 *pu8DataBuf,uint16 u16DataSize, uint16 u16DataOffset);
173 NMI_API sint8 hif_receive(uint32 u32Addr, uint8 *pu8Buf, uint16 u16Sz, uint8 isDone);
219 NMI_API void hif_set_sleep_mode(uint8 u8Pstype);
232 
233 #ifdef CORTUS_APP
234 
248 NMI_API sint8 hif_Resp_handler(uint8 *pu8Buffer, uint16 u16BufferSize);
249 #endif
250 
256 NMI_API void hif_yield(void);
257 
266 
267 #ifdef __cplusplus
268 }
269 #endif
270 #endif
void(* tpfHifCallBack)(uint8 u8OpCode, uint16 u16DataSize, uint32 u32Addr)
used to point to Wi-Fi call back function depend on Arduino project or other projects.
Definition: m2m_hif.h:86
NMI_API sint8 hif_deinit(void *arg)
To Deinitialize HIF layer.
Definition: m2m_hif.c:289
This module contains common APIs declarations.
signed char sint8
Range of values between -128 to 127.
Definition: nm_bsp.h:111
Structure to hold HIF header.
Definition: m2m_hif.h:63
NMI_API sint8 hif_chip_sleep(void)
To make the chip sleep.
Definition: m2m_hif.c:226
sint8 hif_check_compatibility(uint16 u16HifInfo)
To check the compatibility of an image with the current driver.
Definition: m2m_hif.c:327
unsigned short uint16
Range of values between 0 to 65535.
Definition: nm_bsp.h:96
NMI_API uint8 hif_get_sleep_mode(void)
Get the sleep mode of the HIF layer.
Definition: m2m_hif.c:216
uint8 u8Gid
Definition: m2m_hif.h:65
sint8 hif_check_code(uint8 u8Gid, uint8 u8OpCode)
To check that a particular hif message is supported with the current driver/firmware pair...
Definition: m2m_hif.c:394
NMI_API sint8 hif_handle_isr(void)
Handle interrupt received from NMC1500 firmware.
Definition: m2m_hif.c:716
NMI_API sint8 hif_receive(uint32 u32Addr, uint8 *pu8Buf, uint16 u16Sz, uint8 isDone)
Definition: m2m_hif.c:762
sint8 hif_enable_access(void)
To enable access to HIF layer, based on HIF level of Firmware. This function reads HIF level directly...
Definition: m2m_hif.c:343
NMI_API void hif_yield(void)
Yields control from interrupt event handler.
Definition: m2m_hif.c:711
NMI_API void hif_set_sleep_mode(uint8 u8Pstype)
Set the sleep mode of the HIF layer.
Definition: m2m_hif.c:201
NMI_API sint8 hif_register_cb(uint8 u8Grp, tpfHifCallBack fn)
Definition: m2m_hif.c:839
NMI_API sint8 hif_chip_wake(void)
To Wakeup the chip.
Definition: m2m_hif.c:167
unsigned long uint32
Range of values between 0 to 4294967295.
Definition: nm_bsp.h:103
NMI_API sint8 hif_send(uint8 u8Gid, uint8 u8Opcode, uint8 *pu8CtrlBuf, uint16 u16CtrlBufSize, uint8 *pu8DataBuf, uint16 u16DataSize, uint16 u16DataOffset)
Send packet using host interface.
Definition: m2m_hif.c:439
uint8 u8Opcode
Definition: m2m_hif.h:66
unsigned char uint8
Range of values between 0 to 255.
Definition: nm_bsp.h:89
NMI_API sint8 hif_init(void *arg)
To initialize HIF layer.
Definition: m2m_hif.c:266
uint16 u16Length
Definition: m2m_hif.h:67
#define NMI_API
Definition: nm_bsp.h:45


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:57