Appiko
Macros | Functions
SDK_EVAL_Spi_Driver.c File Reference

This file provides all the low level SPI API to access to the device using a software watchdog timer to avoid stuck situation. More...

#include "MCU_Interface.h"
#include "SDK_EVAL_Config.h"
#include "hal_spim.h"
#include "pin_trace.h"
#include "nrf_util.h"
#include "string.h"
#include "log.h"

Go to the source code of this file.

Macros

#define HEADER_WRITE_MASK   0x00
 
#define HEADER_READ_MASK   0x01
 
#define HEADER_ADDRESS_MASK   0x00
 
#define HEADER_COMMAND_MASK   0x80
 
#define LINEAR_FIFO_ADDRESS   0xFF
 
#define BUILT_HEADER(add_comm, w_r)   (add_comm | w_r)
 
#define WRITE_HEADER   BUILT_HEADER(HEADER_ADDRESS_MASK, HEADER_WRITE_MASK)
 
#define READ_HEADER   BUILT_HEADER(HEADER_ADDRESS_MASK, HEADER_READ_MASK)
 
#define COMMAND_HEADER   BUILT_HEADER(HEADER_COMMAND_MASK, HEADER_WRITE_MASK)
 

Functions

void SdkEvalSpiDeinit (void)
 Deinitializes the SPI. More...
 
void SdkEvalSpiInit (void)
 Write single or multiple registers. More...
 
StatusBytes SdkEvalSpiWriteRegisters (uint8_t cRegAddress, uint8_t cNbBytes, uint8_t *pcBuffer)
 Write single or multiple registers. More...
 
StatusBytes SdkEvalSpiReadRegisters (uint8_t cRegAddress, uint8_t cNbBytes, uint8_t *pcBuffer)
 Read single or multiple registers. More...
 
StatusBytes SdkEvalSpiCommandStrobes (uint8_t cCommandCode)
 Send a command. More...
 
StatusBytes SdkEvalSpiWriteFifo (uint8_t cNbBytes, uint8_t *pcBuffer)
 Write data into TX FIFO. More...
 
StatusBytes SdkEvalSpiReadFifo (uint8_t cNbBytes, uint8_t *pcBuffer)
 Read data from RX FIFO. More...
 

Detailed Description

Author
High End Analog & RF BU - AMS
Version
3.2.0
Date
April 01, 2013

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

THIS SOURCE CODE IS PROTECTED BY A LICENSE. FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.

© COPYRIGHT 2013 STMicroelectronics

Definition in file SDK_EVAL_Spi_Driver.c.