PaulStoffregen 9 jaren geleden
bovenliggende
commit
2ab8c95bd3
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. +2
    -0
      Wire.cpp

+ 2
- 0
Wire.cpp Bestand weergeven



void TwoWire::setClock(uint32_t frequency) void TwoWire::setClock(uint32_t frequency)
{ {
if (!(SIM_SCGC4 & SIM_SCGC4_I2C0)) return;
#if F_BUS == 60000000 #if F_BUS == 60000000
if (frequency < 400000) { if (frequency < 400000) {
I2C0_F = 0x2C; // 104 kHz I2C0_F = 0x2C; // 104 kHz


void TwoWire::end() void TwoWire::end()
{ {
if (!(SIM_SCGC4 & SIM_SCGC4_I2C0)) return;
NVIC_DISABLE_IRQ(IRQ_I2C0); NVIC_DISABLE_IRQ(IRQ_I2C0);
I2C0_C1 = 0; I2C0_C1 = 0;
CORE_PIN18_CONFIG = 0; CORE_PIN18_CONFIG = 0;

Laden…
Annuleren
Opslaan