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.
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
configs.cpp
00001 #include "configs.h" 00002 00003 //***************************************************************************** 00004 // Pins/Modules Config 00005 //***************************************************************************** 00006 00007 InterruptIn NextData(p8); // IO 96 00008 InterruptIn FrameSync(p17); // GCLK1 00009 00010 //Ticker ticker; // Timer para Debug 00011 00012 DigitalOut RST(p29); // Pino de reset para o CPLD 00013 DigitalIn PPD(p25); // Pino de conexao com o cristal do CPLD 00014 00015 DigitalOut ENABLE_F_REG(p18); // Configuracao da Alimentacao do CPLD 00016 DigitalOut ENABLE_F_RX(p19); 00017 DigitalOut ENABLE_F_TX(p20); 00018 00019 Serial Uart3(p9,p10); // default baudrate = 9600; Sem paridade, 8bits, 1 stop-bit 00020 00021 int start_cpld( void ) { //CPLD Start 00022 static uint16_t reset = 10000; 00023 ENABLE_F_REG = 1; 00024 ENABLE_F_TX = 1; 00025 ENABLE_F_RX = 1; 00026 DataReady = 0; 00027 RST = 1; 00028 while( reset-- > 1 ){} 00029 RST = 0; 00030 return ( 0 ); 00031 } 00032 00033 ///< Configure LPC4088 00034 int config_lpc( void ){ 00035 // UART3_IRQ configuration 00036 Uart3.attach(&SerialRecvInterrupt, Uart3.RxIrq); 00037 00038 // UART3 mode configuration 00039 Uart3.format(8,SerialBase::Forced1,1); 00040 00041 Uart3.baud(2000000); 00042 00043 NVIC_SetPriority(UART3_IRQn,1); 00044 00045 // USART to PC USB USART 00046 pc.baud(115200); 00047 00048 // Extern Pin Interrupt 00049 NextData.rise(&get2); 00050 00051 // FrameSync for RX - Interrupt 00052 FrameSync.rise(&RXFrameSync); 00053 00054 __enable_irq(); 00055 00056 // iniciando o pin de controle do arduino 00057 hw_extern_wdt = 0; 00058 00059 return ( 0 ); 00060 }
Generated on Tue Jul 12 2022 16:25:03 by
