소스 검색

Add pin definitions for MicroMod

@PaulStoffregen  - Not sure if this helps you or not, but thought since I had updated my excel with the  pin information for the not yet announced MicroMod, that I would add the data for Wire3.

Note: I  can obviously not test it as don't have one, but it does compile and still compiles for T4 and T4.1
main
Kurt Eckhardt 4 년 전
부모
커밋
19ca5461e4
2개의 변경된 파일13개의 추가작업 그리고 2개의 파일을 삭제
  1. +11
    -1
      WireIMXRT.cpp
  2. +2
    -1
      WireIMXRT.h

+ 11
- 1
WireIMXRT.cpp 파일 보기

#if defined(ARDUINO_TEENSY41) #if defined(ARDUINO_TEENSY41)
{{17, 1 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 2}, {44, 2 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 1}}, {{17, 1 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 2}, {44, 2 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 1}},
{{16, 1 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 2}, {45, 2 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 1}}, {{16, 1 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 2}, {45, 2 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 1}},
#else
#else // T4 and ARDUINO_TEENSY_MICROMOD
{{17, 1 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 2}, {36, 2 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 1}}, {{17, 1 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 2}, {36, 2 | 0x10, &IOMUXC_LPI2C3_SDA_SELECT_INPUT, 1}},
{{16, 1 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 2}, {37, 2 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 1}}, {{16, 1 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 2}, {37, 2 | 0x10, &IOMUXC_LPI2C3_SCL_SELECT_INPUT, 1}},
#endif #endif
}; };
TwoWire Wire2(&IMXRT_LPI2C4, TwoWire::i2c4_hardware); TwoWire Wire2(&IMXRT_LPI2C4, TwoWire::i2c4_hardware);


#if defined(ARDUINO_TEENSY_MICROMOD)
PROGMEM
constexpr TwoWire::I2C_Hardware_t TwoWire::i2c2_hardware = {
CCM_CCGR2, CCM_CCGR2_LPI2C2(CCM_CCGR_ON),
{{41, 2 | 0x10, &IOMUXC_LPI2C2_SDA_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
{{40, 2 | 0x10, &IOMUXC_LPI2C2_SCL_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
IRQ_LPI2C4
};
TwoWire Wire3(&IMXRT_LPI2C2, TwoWire::i2c2_hardware);
#endif







+ 2
- 1
WireIMXRT.h 파일 보기

extern TwoWire Wire; extern TwoWire Wire;
extern TwoWire Wire1; extern TwoWire Wire1;
extern TwoWire Wire2; extern TwoWire Wire2;
#if defined(ARDUINO_TEENSY_MICROMOD)
extern TwoWire Wire3; extern TwoWire Wire3;
#endif


class TWBRemulation class TWBRemulation
{ {

Loading…
취소
저장