aboutsummaryrefslogtreecommitdiff
path: root/src/peripherals (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-22fix(timer): Phase Correct mode overruns #119Uri Shaked2-2/+67
2022-02-21fix(timer): OCRH masking #117Uri Shaked2-3/+29
2022-02-07test(watchdog): more robust testsUri Shaked1-0/+2
add assertions, fix #115
2021-12-13fix(twi): fails on repeated start conditionUri Shaked1-1/+12
reproduction: https://wokwi.com/arduino/projects/306115576172905024 minimal reproduction code: ```cpp #include <Wire.h> void setup() { Serial.begin(115200); Wire.begin(); Wire.beginTransmission(0x68); Wire.write( 0x3B); Wire.endTransmission( false); // <---- Fails after this auto n = Wire.requestFrom(0x68, 6); if (n == 6) { int16_t AcX = Wire.read() << 8 | Wire.read(); // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L) int16_t AcY = Wire.read() << 8 | Wire.read(); // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L) int16_t AcZ = Wire.read() << 8 | Wire.read(); // 0x3F (ACCEL_ZOUT_H) & 0x40 (ACCEL_ZOUT_L) Serial.print( "AcX = "); Serial.print( AcX); Serial.print( " | AcY = "); Serial.print( AcY); Serial.print( " | AcZ = "); Serial.print( AcZ); Serial.println(); } else { Serial.println( "--------- ERROR ---------"); } } void loop() {} ```
2021-10-30feat(spi): add `onByte` callbackUri Shaked2-19/+44
a more versatile alternative to the `onTransfer` callback. Depracate `onTransfer()`.
2021-10-29fix(timer): setting TCNT doesn't update OCRA #111Uri Shaked2-0/+44
2021-10-24fix(eeprom): EEPROM interrupt not firing #110Uri Shaked2-3/+32
fix #110
2021-10-22fix(spi): setting SPIE doesn't fire pending interruptUri Shaked2-0/+25
2021-10-07feat(timer): Force Output Compare (FOC) bitsUri Shaked2-5/+98
2021-09-14feat(timer): 3rd output compare (OCRnC) #96Uri Shaked2-13/+170
2021-09-10feat(adc): ADC peripheral #13Uri Shaked2-0/+395
2021-09-10feat(watchdog): implement watchdog timer #106Uri Shaked2-0/+344
2021-09-07fix(gpio): CBI/SBI handling in writes to PIN register #103Uri Shaked2-2/+42
fix #103
2021-08-15feat(timer): external timer support #97Uri Shaked4-93/+170
also refactor timer/GPIO interaction to be more generic. close #97
2021-08-15chore(deps): prettier 2.3.2Uri Shaked1-16/+2
also reformat all the code with the new version
2021-08-13fix(gpio): timer outputs not reflected in PIN register #102Uri Shaked2-8/+22
fix #102
2021-08-09fix(gpio): PWM may leaves pins in high stateUri Shaked1-0/+1
Disabling PWM when a GPIO pin is high will cause the pin to get stuck in high state.
2021-08-07style(spi): remove redundant whitespace from commentsUri Shaked1-2/+2
2021-07-17feat(usart): add `immediate` parameter to writeByte()Uri Shaked1-8/+12
The value will be available immediately to the user program instead of waiting one symbol time before making it available.
2021-07-16fix(usart): tx / rx complete timingUri Shaked1-1/+1
fix the calculation of cyclesPerChar, which is used to determine when a USART RX/TX operation is marked complete.
2021-07-15feat(usart): add configuration change eventUri Shaked2-3/+95
also add `txEnable` and `rxEnable` properties
2021-07-07fix(timer): only set ICR hook for 16-bit timersUri Shaked1-3/+3
The ICR (Input Capture Register) only exists for 16-bit timers.
2021-07-07feat(gpio): external interrupt/PCINT support (#82)Uri Shaked2-18/+450
close #70, #84
2021-06-19fix(timer): Timer1 PWM issues #94Uri Shaked2-2/+24
close #94
2021-04-15fix(twi): broken repeated start #91Uri Shaked2-1/+26
fix #91
2021-02-19feat(usart): implement RX #11Uri Shaked3-6/+97
close #11
2021-01-02fix: typo in parameter nameUri Shaked3-6/+6
freqMHz → freqHz in SPI, TWI, and USART: they all expect the frequency in hertz, not mega-hertz.
2020-12-29fix(timer): delay() is inaccurate #81Uri Shaked2-21/+26
fix #81
2020-12-27fix(timer): Output Compare in PWM modes #78Uri Shaked3-59/+325
close #78
2020-12-26fix(timer): Overflow interrupt fires twice #80Uri Shaked2-7/+45
fix #80
2020-12-25fix(timer): Output Compare sometimes misses Compare Match #79Uri Shaked2-6/+45
fix #79
2020-12-21fix(timer): Output Compare issue #74Uri Shaked2-10/+28
output compare doesn't work when the OCR register (OCRnA/OCRnB) equals to 0 fix #74
2020-12-20fix(timer): TOV flag does not update correctly #75Uri Shaked2-20/+56
fix #75
2020-12-20fix(timer): OCR values should be buffered #76Uri Shaked2-11/+125
fix #76
2020-12-12fix(timer): Incorrect count when stopping a timerUri Shaked2-18/+41
fix #72
2020-12-09perf!: centeral timekeepingUri Shaked10-211/+173
This should improve performance, especially when running simulations with multiple peripherals. For instance, the demo project now runs at ~322%, up from ~185% in AVR8js 0.13.1. BREAKING CHANGE: `tick()` methods were removed from individual peripherals. You now need to call `cpu.tick()` instead.
2020-12-09refactor: central interrupt handling #38Uri Shaked10-89/+208
2020-11-27fix(usart): respect the given baud rate #16Uri Shaked2-54/+150
close #16
2020-11-25feat(clock): Clock Prescale (CLKPR) support #68Uri Shaked2-0/+184
close #68
2020-11-14feat: Support for simulating ATtinyx5 (e.g. ATtiny85) timers #64Uri Shaked2-12/+60
close #64
2020-11-14fix: AVRTimerConfig interface not exported #65Uri Shaked1-1/+1
close #65
2020-10-07test(gpio): extract constantsUri Shaked1-26/+30
2020-10-07fix(gpio): Changing pinMode from `INPUT` to `INPUT_PULLUP` doesn't trigger ↵Uri Shaked2-4/+13
listeners close #62
2020-09-02perf(timer): speed up interrupt handlingUri Shaked1-1/+4
2020-09-02perf(timer): improve timer speedUri Shaked2-11/+17
cache the value of the clock divider
2020-08-22style(spi): remove redundant eslint commentsUri Shaked1-2/+0
2020-08-22feat(spi): implement SPI master #33Uri Shaked2-0/+351
close #33
2020-08-22test(eeprom): remove useless lineUri Shaked1-1/+0
2020-08-01fix(timer): keeps counting even when stopped #41Uri Shaked2-36/+51
2020-08-01test(timer): use TestProgramRunnerUri Shaked2-134/+127