English
Language : 

SDBC-DK3UG Datasheet, PDF (67/76 Pages) Silicon Laboratories – 4 buttons and 4 LEDs for custom purposes
SDBC-DK3 UG
11. C8051
The C8051.c module contains all the low level, 8051 dependent functions. The code mostly comprises of hardware
SPI setup and SPI read/write function calls.
The SetHwMasterSpi() function initializes the 3-wire HW SPI port. This does not control the nSEL pin. The nSEL
pin is controlled separately by RF_NSEL_PIN.
The SpiWrite() function sends data through the SPI port (8 bits length). The nSEL pin is controlled separately by
RF_NSEL_PIN.
The SpiReadWrite() function sends and reads data via the SPI port (8 bits length). The nSEL pin is controlled
separately by RF_NSEL_PIN.
The SpiRfWriteAddressData() function sends data through the SPI port (16 length - 8 bits address, 8 bits data).
This function controls the nSEL pin.
The SpiRfWriteAddressData() function reads the current value of the register. This function controls the nSEL pin.
11.1. C8051 Header File
/*************************************************************************************
*
**
** FILE --- C8051.h
**
** DESCRIPTION
** Contains the 8051 specific declarations, IO declarations, type declarations
**
** CREATED
** Silicon Laboratories Hungary Ltd
**
** COPYRIGHT
** Copyright 2008 Silicon Laboratories, Inc.
** http://www.silabs.com
**
**************************************************************************************
/
#ifndef C8051_H
#define C8051_H
#include <compiler_defs.h>
#include <C8051F930_defs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// compiler declarations
Rev. 0.4
67