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: PCAL955x mbed mbed-rtos AT45
config_io.h
00001 // -------------------------------------------------------------// 00002 00003 00004 //------- discr output ------------ 00005 DigitalOut led (PA_6); // выход LED на плате 00006 00007 //----- port UART -------------- 00008 //Serial uart(PA_0, PA_1); // tx, rx 00009 DigitalOut led_r (PA_1); // выход LED 00010 DigitalOut led_b (PA_0); // выход LED 00011 00012 00013 00014 DigitalOut y_1 (PC_4); // выход 1 00015 DigitalOut y_2 (PC_5); // выход 2 00016 DigitalOut y_3 (PC_6); // выход 3 00017 DigitalOut y_4 (PC_7); // выход 4 00018 DigitalOut y_5 (PC_8); // выход 4 00019 DigitalOut y_6 (PC_9); // выход 4 00020 DigitalOut y_7 (PC_10); // выход 4 00021 DigitalOut y_8 (PC_11); // выход 4 00022 00023 DigitalOut txd (PA_0); // for test 00024 00025 //------- discr input i2c PCA9555 ------------ 00026 PCAL9555 gpio_exp( PB_9, PB_8, 0x42); // SDA, SCL, Slave_address 00027 GpioBusIn inps( gpio_exp, X1_7, X1_6, X1_5, X1_4, X1_3, X1_2, X1_1, X1_0, X0_7, X0_6, X0_5, X0_4, X0_3, X0_2, X0_1, X0_0 ); 00028 00029 00030 //------- analog input -------------------- 00031 AnalogIn aninp1(PC_0); 00032 AnalogIn aninp2(PC_1); 00033 AnalogIn aninp3(PC_2); 00034 AnalogIn aninp4(PC_3); 00035 00036 //------- analog output ------------------ 00037 AnalogOut anout1(PA_4); 00038 AnalogOut anout2(PA_5); 00039 00040 00041 //-------- for SERIAL interface ---------- 00042 Serial pc(PA_2, PA_3); // tx, rx 00043 00044 00045 //----------- SPI interface AT45 FLASH ----------- 00046 SPI spi(PB_15, PB_14, PB_13); // mosi, miso, sclk 00047 AT45 spif(&spi, PB_12); // cs 00048 00049 //--------- CAN_BUS -------------------- 00050 CAN can(PA_11,PA_12); 00051 00052 //--------- sys timer ----------------- 00053 Timer st; 00054
Generated on Sat Jul 16 2022 13:16:41 by
1.7.2