$search
00001 /***************************************************************************** 00002 * ssp.h: Header file for Philips LPC214x Family Microprocessors 00003 * 00004 * Copyright(C) 2006, Philips Semiconductor 00005 * All rights reserved. 00006 * 00007 * History 00008 * 2005.10.01 ver 1.00 Prelimnary version, first Release 00009 * 00010 ******************************************************************************/ 00011 #ifndef __SSP_H__ 00012 #define __SSP_H__ 00013 00014 volatile unsigned int SSP_trans_cnt; 00015 00016 /* SPI read and write buffer size */ 00017 #define FIFOSIZE 8 00018 00019 /* SPI Status register */ 00020 #define SSPSR_TFE 1 << 0 00021 #define SSPSR_TNF 1 << 1 00022 #define SSPSR_RNE 1 << 2 00023 #define SSPSR_RFF 1 << 3 00024 #define SSPSR_BSY 1 << 4 00025 00026 /* SPI 1 CR0 register */ 00027 #define SSPCR0_DSS 1 << 0 00028 #define SSPCR0_FRF 1 << 4 00029 #define SSPCR0_CPOL 1 << 6 00030 #define SSPCR0_CPHA 1 << 7 00031 #define SSPCR0_SCR 1 << 8 00032 00033 /* SPI 1 CR1 register */ 00034 #define SSPCR1_LBM 1 << 0 00035 #define SSPCR1_SSE 1 << 1 00036 #define SSPCR1_MS 1 << 2 00037 #define SSPCR1_SOD 1 << 3 00038 00039 /* SPI 1 Interrupt Mask Set/Clear register */ 00040 #define SSPIMSC_RORIM 1 << 0 00041 #define SSPIMSC_RTIM 1 << 1 00042 #define SSPIMSC_RXIM 1 << 2 00043 #define SSPIMSC_TXIM 1 << 3 00044 00045 /* SPI 1 Interrupt Status register */ 00046 #define SSPRIS_RORRIS 1 << 0 00047 #define SSPRIS_RTRIS 1 << 1 00048 #define SSPRIS_RXRIS 1 << 2 00049 #define SSPRIS_TXRIS 1 << 3 00050 00051 /* SPI 1 Masked Interrupt register */ 00052 #define SSPMIS_RORMIS 1 << 0 00053 #define SSPMIS_RTMIS 1 << 1 00054 #define SSPMIS_RXMIS 1 << 2 00055 #define SSPMIS_TXMIS 1 << 3 00056 00057 /* SPI 1 Interrupt clear register */ 00058 #define SSPICR_RORIC 1 << 0 00059 #define SSPICR_RTIC 1 << 1 00060 00061 extern void SSPHandler (void) __irq; 00062 int LL_write(unsigned char *, unsigned short, unsigned char); 00063 void LL_write_init(void); 00064 00065 unsigned char IMU_CalcData_updated; 00066 00067 #endif /* __SSP_H__ */ 00068 /***************************************************************************** 00069 ** End Of File 00070 ******************************************************************************/ 00071