aboutsummaryrefslogtreecommitdiff
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
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 Shaked4-18/+459
close #70, #84
2021-06-20perf(cpu): speed up event systemUri Shaked1-25/+47
Use a linked list instead of array. This makes the simulator runs almost twice as fast in case of timers with prescaler of 1, e.g. when using the TVout library. In addition, we use a pool of clock event objects to avoid expensive GCs.
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 Shaked4-7/+99
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 Shaked6-67/+353
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-12perf(cpu): speed up event systemUri Shaked2-18/+59
ditch `array.sort()` and instead manually keep the array sorted when we insert a new item.
2020-12-12test(cpu): fix implicit any errorUri Shaked1-3/+5
2020-12-12fix(cpu): event system issueUri Shaked2-2/+63
`updateClockEvent()` and `clearClockEvent()` would sometimes mess up the list of events. This could cause unexpected behavior when you have multiple timers running. Also added regression tests for these methods.
2020-12-12fix(timer): Incorrect count when stopping a timerUri Shaked2-18/+41
fix #72
2020-12-09perf!: centeral timekeepingUri Shaked12-221/+222
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 Shaked12-92/+285
2020-12-09test(cpu): improve test nameUri Shaked1-1/+1
2020-11-27fix(usart): respect the given baud rate #16Uri Shaked2-54/+150
close #16
2020-11-25feat(clock): Clock Prescale (CLKPR) support #68Uri Shaked3-0/+185
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 Shaked2-2/+8
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-30fix(cpu): incorrect address for RAMPZ / EINDUri Shaked2-8/+8
We used their I/O space address intead of their data space address. close #61
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-09-02fix(interrupt): broken on ATmega2560Uri Shaked2-1/+23
close #58
2020-09-02fix(instruction): EICALL is brokenUri Shaked2-1/+3
close #59
2020-08-22style(spi): remove redundant eslint commentsUri Shaked1-2/+0
2020-08-22feat(spi): implement SPI master #33Uri Shaked4-1/+368
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 Shaked3-135/+128
2020-07-16fix(eeprom): EEPROM write fails after first attemptUri Shaked2-1/+33
close #54
2020-07-16feat(eeprom): implement EEPROM peripheralUri Shaked6-42/+408
close #15
2020-07-16test(timer): remove stray console.logUri Shaked1-1/+0
2020-07-16test(twi): extract constantsUri Shaked1-31/+46
This makes the test code more readable
2020-07-09fix(usart): bitsPerChar looking at the wrong registerUri Shaked2-7/+10
close #52
2020-07-09fix(usart): TXC interrupt triggered incorrectlyUri Shaked2-4/+18
close #51
2020-07-09test(usart): extract constantsUri Shaked1-49/+68
This makes the test code easier to read
2020-06-04test(instruction): extract constantsUri Shaked1-238/+274
This makes the test code easier to follow
2020-05-30test(timer): extract constantsUri Shaked1-133/+185
This makes the test code easier to follow
2020-05-29fix(gpio): port state not updated on DDR writeUri Shaked2-0/+15
Calling `pinState()` inside a GPIO port listener returns incorrect values after changing DDR close #47
2020-05-25perf(timer): improve tick() performanceUri Shaked1-3/+4
reduce the number of calls to TIFR/TIMSK getters