This software is designed to write to an SD card on the mbed adapter module which is part of the RS-EDP system.
Dependencies: mbed SDFileSystem
mbed_Port_Structure.cpp
00001 /* Configure the I/O Port Structure */ 00002 /* ******************************** */ 00003 00004 00005 /* includes files */ 00006 #include "mbed.h" /* Header file for mbed module */ 00007 #include "defines.h" /* User defines */ 00008 #include "misra_types.h" /* MISRA Types */ 00009 #include "SDFileSystem.h" /* File System for SD Card */ 00010 00011 00012 00013 /* Digital I/O */ 00014 DigitalOut User_Led1(LED1); 00015 DigitalOut User_Led2(LED2); 00016 DigitalOut User_Led3(LED3); 00017 DigitalOut User_Led4(LED4); 00018 00019 00020 /* SPI Interface to RS-EDP CNTRL_SPI and the SD Card on Adapter board */ 00021 SDFileSystem sd(p11, p12, p13, p14, "sd"); 00022 00023 00024 /* Configure the USB as a virtual communications port */ 00025 Serial pc(USBTX, USBRX); 00026 00027 00028 00029 00030 /* Function Prototypes */ 00031 void setup_mbed_ports(void); 00032 00033 00034 00035 /* Configure the I/O Ports */ 00036 void setup_mbed_ports(void) 00037 { 00038 pc.baud(115000); /* Baud rate should be 115k baud */ 00039 pc.format(8, Serial::None, 1); /* format is 8 data bits, no stop bit, no parity */ 00040 00041 User_Led1 = LED_ON; 00042 User_Led2 = LED_OFF; 00043 User_Led3 = LED_ON; 00044 User_Led4 = LED_OFF; 00045 } 00046 00047
Generated on Sun Jul 17 2022 16:04:24 by 1.7.2