1

Sync with BSuSP

This commit is contained in:
2023-03-03 15:40:25 +01:00
parent 8bec9735e3
commit 5349bca520
27 changed files with 804 additions and 2523 deletions

View File

@ -2,7 +2,7 @@
void Pit::earlyDelay(uint16_t us) {
uint32_t counter = (static_cast<double>(BASE_FREQUENCY) / 1'000'000) * us;
controlPort.writeByte(0b110000); // Channel 0, mode 0
controlPort.writeByte(0b110000); // Channel 0, mode 0
dataPort0.writeByte(static_cast<uint8_t>(counter & 0xFF)); // Low byte
dataPort0.writeByte(static_cast<uint8_t>((counter >> 8) & 0xFF)); // High byte