Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ssp0.h
00001 /**************************************************************************** 00002 * Copyright 2010 Andy Kirkham, Stellar Technologies Ltd 00003 * 00004 * This file is part of the Satellite Observers Workbench (SOWB). 00005 * 00006 * SOWB is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * SOWB is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with SOWB. If not, see <http://www.gnu.org/licenses/>. 00018 * 00019 * $Id: main.cpp 5 2010-07-12 20:51:11Z ajk $ 00020 * 00021 ***************************************************************************/ 00022 00023 #ifndef SSP0_H 00024 #define SSP0_H 00025 00026 #define FLASH_SSP_INIT_CPSR 2 00027 #define _25AA02E48_SSP_INIT_CPSR 0x64 00028 00029 00030 #define SSP0_TX_FIFO_SPACE_AVAILABLE \ 00031 LPC_SSP0->SR & (1UL << 1) 00032 00033 #define SSP0_TX_FIFO_NOT_EMPTY \ 00034 (!(SSP0_TX_FIFO_SPACE_AVAILABLE)) 00035 00036 #define SSP0_IS_BUSY \ 00037 LPC_SSP0->SR & (1UL << 4) 00038 00039 #define SSP0_FLUSH_RX_FIFO \ 00040 while(LPC_SSP0->SR & (1UL << 2)) { \ 00041 unsigned int dev_null = LPC_SSP0->DR; \ 00042 } 00043 00044 #define SSP0_WRITE_BYTE(byte) \ 00045 while(!SSP0_TX_FIFO_SPACE_AVAILABLE); \ 00046 LPC_SSP0->DR=(uint32_t)(byte&0xFF) 00047 00048 00049 void SSP0_init(void); 00050 bool SSP0_request(void); 00051 void SSP0_release(void); 00052 00053 #endif
Generated on Tue Jul 12 2022 18:05:35 by
