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.
tinyI2C_824.h
00001 /* 00002 tinyI2C_824.h 00003 */ 00004 00005 static const uint8_t chip_id = ID_LPC824; 00006 #define isI2C1 // unused(always enabled) 00007 I2C dev1(I2C_SDA, I2C_SCL);//11,10 hard coded, 220 ohm pull-up 00008 00009 #define isI2C2 00010 #define isI2C3 00011 #define isI2C4 00012 00013 #define isUART 00014 #undef isUSBUART 00015 Serial pc(USBTX, USBRX); // P0_7, P0_18 00016 00017 #define isHWSPI 00018 #undef isSWSPI 00019 00020 #define isGPIO0 // unused(always enabled) 00021 #undef isGPIO1 00022 00023 #if defined(TARGET_SSCI824) 00024 I2C dev2(P0_16, P0_27); 00025 I2C dev3(P0_26, P0_25); 00026 I2C dev4(P0_24, P0_15); 00027 DigitalOut _cs(P0_1); // CS 00028 SPI _spi(P0_14, P0_0, P0_6); // mosi, miso, sclk 00029 DigitalInOut _GPIO00(P0_23); 00030 DigitalInOut _GPIO01(P0_22); 00031 DigitalInOut _GPIO02(P0_21); 00032 DigitalInOut _GPIO03(P0_20); 00033 DigitalInOut _GPIO04(P0_19); 00034 DigitalInOut _GPIO05(P0_17); 00035 DigitalInOut _GPIO06(P0_13); 00036 DigitalInOut _GPIO07(P0_12); 00037 #elif defined(TARGET_LPC824) 00038 I2C dev2(P0_6, P0_14); // 6,14 | A0, A1 00039 I2C dev3(P0_23, P0_22); // 23,22 | A2, A3 00040 I2C dev4(P0_21, P0_20); // 21,20 | A4, A5 00041 SPI _spi(P0_26, P0_25, P0_24); // mosi, miso, sclk, D11, D12, D13 00042 DigitalOut _cs(P0_15); // CS, D10 00043 DigitalInOut _GPIO00(P0_19); // D2 00044 DigitalInOut _GPIO01(P0_12); // D3 00045 DigitalInOut _GPIO02(P0_18); // D4 00046 DigitalInOut _GPIO03(P0_28); // D5 00047 DigitalInOut _GPIO04(P0_16); // D6 00048 DigitalInOut _GPIO05(P0_17); // D7 00049 DigitalInOut _GPIO06(P0_13); // D8 00050 DigitalInOut _GPIO07(P0_27); // D9 00051 #endif
Generated on Wed Jul 13 2022 23:08:59 by
1.7.2