AN1921 Motorola / Freescale Semiconductor, AN1921 Datasheet - Page 16

no-image

AN1921

Manufacturer Part Number
AN1921
Description
AN1921 General DSP568xx Interface Examples using the Embedded SDK
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
Integrating Devices With the EVM Board
16
#include "io.h"
#include "fcntl.h"
#include "bsp.h"
#include "spi.h"
#include "stdio.h"
#include "serial.h"
#include "string.h"
#include "port.h"
#include "timer.h"
#include "types.h"
#include "math.h"
#include "lcd.h"
#include "TLC2543.h"
void BaroAdj( int , Word32 * );
void main(void)
{
static Word32
spi_sParams
int
UWord16
char
char
char
static char
struct timespec TenthSecond = {0, 100000000};
struct timespec OneMillisecond = {0,1000000};
int
static UWord16
static UWord16
Word16
static Word32
static Word32
SpiParams.bSetAsMaster = 1;
SerialMaster = open( BSP_DEVICE_NAME_SPI_0, 0, &SpiParams );
/* Open Serial Port via SPI1 and Uart */
Uart = open( BSP_DEVICE_NAME_SERIAL_0, 0 );
NewUartState = MAX3100_FIFO_DISABLE | \
Interface Examples Using the Embedded SDK
MAX3100_INT_ENABLE_DATA | \
MAX3100_IR_DISABLE | \
MAX3100_STOPBIT_1 | \
MAX3100_PARITY_NONE | \
MAX3100_WORD_8BIT | \
MAX3100_BAUD_9600;
BaroPress, BAdj;
SpiParams;
Uart;
NewUartState;
TitleString1[] = {"DSP Interface Demo"};
TitleString2[] = {"
astring[20];
inputarrry[8];
SerialMaster;
Datain, DataStore[70];
i, ii;
sum;
Vcount;
ADcmd;
/* SPI0 is set as master */
Barometric Meas.\n"};

Related parts for AN1921