Code Listing: Freemaster_Demo - Freescale Semiconductor DSP56800E User Manual

Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

FreeMASTER Driver
6.6.2

Code Listing: freemaster_demo

The code listed below may be found in the FreeMASTER sample application main file for any
56F8xxx device.
/*******************************************************************************
*
* Freescale Semiconductor Inc.
* (c) Copyright 2004 Freescale Semiconductor, Inc.
* (c) Copyright 2001-2004 Motorola, Inc.
* ALL RIGHTS RESERVED.
*
********************************************************************************
*
* FILE NAME: main.c
*
* DESCRIPTION: Simple sample application demonstrating the functionality of
*
FreeMASTER software driver. Please see also the freemaster_demo2
*
application which demonstrates use of advanced FreeMASTER
*
features (Target-side Addressing, Memory Access security etc.)
*
*
The FreeMASTER driver and the SCI module are configured by GCT
*
* TARGET: MC56F8xxx device
*
*******************************************************************************/
#include "qs.h"
#include "intc.h"
#include "gpio.h"
#include "occs.h"
#include "sci.h"
#include "sys.h"
#include "freemaster.h"
/* Test variables, will be displayed in the FreeMASTER application */
volatile UWord8
var8;
volatile UWord16 var16;
volatile UWord16 var16inc = 1;
volatile UWord32 var32;
volatile UWord32 var32inc = 100;
/* local prototypes */
void init_pins(void);
void init_uart(void);
/////////////////////////////////////////////////////////////////////////
int main(void)
{
UWord16 nAppCmdCode;
// initialize SYS and GPIO modules
init_pins();
// initialize UART
init_uart();
// FreeMASTER initialization
FMSTR_Init();
// initialize & enable interrupts
ioctl(INTC, INTC_INIT, NULL);
6-24
Targeting 56F8xxx Platform
FREESCALE SEMICONDUCTOR

Advertisement

Table of Contents
loading

Table of Contents