Microchip® Advanced Software Framework

nmbus.c File Reference

This module contains NMC1000 bus APIs implementation.

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

#include "nmbus.h"
#include "nmi2c.h"
#include "nmspi.h"
#include "nmuart.h"

Macros

#define MAX_TRX_CFG_SZ   8
 

Functions

sint8 nm_bus_iface_deinit (void)
 Deinitialize bus interface. More...
 
sint8 nm_bus_iface_init (void *pvInitVal)
 
sint8 nm_bus_iface_reconfigure (void *ptr)
 
sint8 nm_bus_reset (void)
 reset bus interface More...
 
sint8 nm_read_block (uint32 u32Addr, uint8 *puBuf, uint32 u32Sz)
 
uint32 nm_read_reg (uint32 u32Addr)
 
sint8 nm_read_reg_with_ret (uint32 u32Addr, uint32 *pu32RetVal)
 
sint8 nm_write_block (uint32 u32Addr, uint8 *puBuf, uint32 u32Sz)
 
sint8 nm_write_reg (uint32 u32Addr, uint32 u32Val)
 
static sint8 p_nm_read_block (uint32 u32Addr, uint8 *puBuf, uint16 u16Sz)
 
static sint8 p_nm_write_block (uint32 u32Addr, uint8 *puBuf, uint16 u16Sz)
 

#define MAX_TRX_CFG_SZ   8

Referenced by nm_read_block(), and nm_write_block().

nm_bus_iface_deinit ( void  )

Deinitialize bus interface.

Returns
M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
Author
Samer Sarhan
Date
07 April 2014
Version
1.0
Returns
M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure

References M2M_SUCCESS, and nm_bus_deinit().

Referenced by nm_drv_deinit(), nm_drv_init_hold(), and nm_drv_init_start().

sint8 nm_bus_iface_init ( void *  pvInitVal)
sint8 nm_bus_iface_reconfigure ( void *  ptr)
nm_bus_reset ( void  )

reset bus interface

Returns
M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
Version
1.0

References M2M_SUCCESS, and nm_spi_reset().

Referenced by chip_wake().

sint8 nm_write_block ( uint32  u32Addr,
uint8 puBuf,
uint32  u32Sz 
)
static sint8 p_nm_read_block ( uint32  u32Addr,
uint8 puBuf,
uint16  u16Sz 
)
static
static sint8 p_nm_write_block ( uint32  u32Addr,
uint8 puBuf,
uint16  u16Sz 
)
static