Delta / NNN50_WIFI_API

Dependents:   NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more

Embed: (wiki syntax)

« Back to documentation index

m2m_hif.c File Reference

m2m_hif.c File Reference

This module contains M2M host interface APIs implementation. More...

Go to the source code of this file.

Functions

static void m2m_hif_cb (uint8 u8OpCode, uint16 u16DataSize, uint32 u32Addr)
 WiFi call back function.
sint8 hif_chip_wake (void)
 To Wakeup the chip.
void hif_set_sleep_mode (uint8 u8Pstype)
 Set the sleep mode of the HIF layer.
uint8 hif_get_sleep_mode (void)
 Get the sleep mode of the HIF layer.
sint8 hif_chip_sleep_sc (void)
 To clear the chip sleep but keep the chip sleep.
sint8 hif_chip_sleep (void)
 To make the chip sleep.
sint8 hif_init (void *arg)
 To initialize HIF layer.
sint8 hif_deinit (void *arg)
 To De-initialize HIF layer.
sint8 hif_send (uint8 u8Gid, uint8 u8Opcode, uint8 *pu8CtrlBuf, uint16 u16CtrlBufSize, uint8 *pu8DataBuf, uint16 u16DataSize, uint16 u16DataOffset)
 Send packet using host interface.
static sint8 hif_isr (void)
 Host interface interrupt service routine.
sint8 hif_handle_isr (void)
 Handle interrupt received from NMC1500 firmware.

Detailed Description

This module contains M2M host interface APIs implementation.

Copyright (c) 2016-2017 Atmel Corporation. All rights reserved.

Definition in file m2m_hif.c.


Function Documentation

NMI_API sint8 hif_chip_sleep ( void   )

To make the chip sleep.

Returns:
The function shall return ZERO for successful operation and a negative value otherwise.

Definition at line 219 of file m2m_hif.c.

NMI_API sint8 hif_chip_sleep_sc ( void   )

To clear the chip sleep but keep the chip sleep.

Returns:
The function shall return ZERO for successful operation and a negative value otherwise.

Definition at line 205 of file m2m_hif.c.

NMI_API sint8 hif_chip_wake ( void   )

To Wakeup the chip.

Returns:
The function shall return ZERO for successful operation and a negative value otherwise.

Definition at line 142 of file m2m_hif.c.

NMI_API sint8 hif_deinit ( void *  arg )

To De-initialize HIF layer.

Parameters:
[in]argPointer to the arguments.
Returns:
The function shall return ZERO for successful operation and a negative value otherwise.

Definition at line 265 of file m2m_hif.c.

NMI_API uint8 hif_get_sleep_mode ( void   )

Get the sleep mode of the HIF layer.

Returns:
The function SHALL return the sleep mode of the HIF layer.

Definition at line 194 of file m2m_hif.c.

hif_handle_isr ( void   )

Handle interrupt received from NMC1500 firmware.

Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 571 of file m2m_hif.c.

NMI_API sint8 hif_init ( void *  arg )

To initialize HIF layer.

Parameters:
[in]argPointer to the arguments.
Returns:
The function shall return ZERO for successful operation and a negative value otherwise.

Definition at line 251 of file m2m_hif.c.

hif_isr ( void   ) [static]

Host interface interrupt service routine.

Author:
M. Abdelmawla
Date:
15 July 2012
Returns:
1 in case of interrupt received else 0 will be returned
Version:
1.0

start bus transfer

Definition at line 427 of file m2m_hif.c.

NMI_API sint8 hif_send ( uint8  u8Gid,
uint8  u8Opcode,
uint8 pu8CtrlBuf,
uint16  u16CtrlBufSize,
uint8 pu8DataBuf,
uint16  u16DataSize,
uint16  u16DataOffset 
)

Send packet using host interface.

Parameters:
[in]u8GidGroup ID.
[in]u8OpcodeOperation ID.
[in]pu8CtrlBufPointer to the Control buffer.
[in]u16CtrlBufSizeControl buffer size.
[in]u16DataOffsetPacket Data offset.
[in]pu8DataBufPacket buffer Allocated by the caller.
[in]u16DataSizePacket buffer size (including the HIF header).
Returns:
The function shall return ZERO for successful operation and a negative value otherwise.

Definition at line 294 of file m2m_hif.c.

NMI_API void hif_set_sleep_mode ( uint8  u8Pstype )

Set the sleep mode of the HIF layer.

Parameters:
[in]u8PstypeSleep mode.
Returns:
The function SHALL return 0 for success and a negative value otherwise.

Definition at line 179 of file m2m_hif.c.

static void m2m_hif_cb ( uint8  u8OpCode,
uint16  u16DataSize,
uint32  u32Addr 
) [static]

WiFi call back function.

Parameters:
[in]u8OpCodeHIF Opcode type.
[in]u16DataSizeHIF data length.
[in]u32AddrHIF address.
[in]grpHIF group type.
Author:
Date:
Version:
1.0

Definition at line 131 of file m2m_hif.c.