/*C**************************************************************************
* Module:
/****************************************************************************
* Copyright (c) 2004 ID TECH inc.,
/****************************************************************************
* CREATION_DATE:
/****************************************************************************
* PURPOSE:
* spi library low level functions (init, receive and send functions)
* and global variables declarations to use with user software application
*****************************************************************************/
/*
I N C L U D E S
#include "spi_drv.h"
/*
M A C R O S
/*
D E F I N I T I O N
Uchar transmit_completed = 0; // 0 by default
extern Uchar data SPI_IPNT;
/*
D E C L A R A T I O N
// Here are some global flags to use with spi library
// These global flags arec used to communicate with higher level functions ( user application )
// Here the globals variables to communicate with spi interrupt routine
/*F**************************************************************************
* NAME: spi_isp
*
* PARAMS: none
* return: none
*
* PURPOSE:
* spi - interruption program for serial transmission ( Master and Slave mode )
*
* NOTE:
*****************************************************************************/
Interrupt(void spi_isp(void), IRQ_SPI){
if(Spif_set()){ // Quit if data transfer hasn't been completed.
transmit_completed = 1;
SPI_IPNT = SPDAT;
Register
return;
}
}
Copyright © 2010-2013, International Technologies & Systems Corporation. All rights reserved.
SecureHead SPI Interface with FPC User Manual
spi_drv.c
2004.1.10
// Store SPI input data in SPI_IPNT. SPDAT - Serial Peripheral Data
// Set software complete flag
Page 58 of 67
*/
*/
*/
*/
Need help?
Do you have a question about the SecureHead and is the answer not in the manual?