aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat(gpio): external interrupt/PCINT support (#82)Uri Shaked2021-07-074-18/+459
| | | close #70, #84
* perf(cpu): speed up event systemUri Shaked2021-06-201-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.
* fix(timer): Timer1 PWM issues #94Uri Shaked2021-06-192-2/+24
| | | | close #94
* fix(twi): broken repeated start #91Uri Shaked2021-04-152-1/+26
| | | | fix #91
* feat(usart): implement RX #11Uri Shaked2021-02-194-7/+99
| | | | close #11
* fix: typo in parameter nameUri Shaked2021-01-023-6/+6
| | | | | freqMHz → freqHz in SPI, TWI, and USART: they all expect the frequency in hertz, not mega-hertz.
* fix(timer): delay() is inaccurate #81Uri Shaked2020-12-292-21/+26
| | | | fix #81
* fix(timer): Output Compare in PWM modes #78Uri Shaked2020-12-276-67/+353
| | | | close #78
* fix(timer): Overflow interrupt fires twice #80Uri Shaked2020-12-262-7/+45
| | | | fix #80
* fix(timer): Output Compare sometimes misses Compare Match #79Uri Shaked2020-12-252-6/+45
| | | | fix #79
* fix(timer): Output Compare issue #74Uri Shaked2020-12-212-10/+28
| | | | | | output compare doesn't work when the OCR register (OCRnA/OCRnB) equals to 0 fix #74
* fix(timer): TOV flag does not update correctly #75Uri Shaked2020-12-202-20/+56
| | | | fix #75
* fix(timer): OCR values should be buffered #76Uri Shaked2020-12-202-11/+125
| | | | fix #76
* perf(cpu): speed up event systemUri Shaked2020-12-122-18/+59
| | | | ditch `array.sort()` and instead manually keep the array sorted when we insert a new item.
* test(cpu): fix implicit any errorUri Shaked2020-12-121-3/+5
|
* fix(cpu): event system issueUri Shaked2020-12-122-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.
* fix(timer): Incorrect count when stopping a timerUri Shaked2020-12-122-18/+41
| | | | fix #72
* perf!: centeral timekeepingUri Shaked2020-12-0912-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.
* refactor: central interrupt handling #38Uri Shaked2020-12-0912-92/+285
|
* test(cpu): improve test nameUri Shaked2020-12-091-1/+1
|
* fix(usart): respect the given baud rate #16Uri Shaked2020-11-272-54/+150
| | | | close #16
* feat(clock): Clock Prescale (CLKPR) support #68Uri Shaked2020-11-253-0/+185
| | | | close #68
* feat: Support for simulating ATtinyx5 (e.g. ATtiny85) timers #64Uri Shaked2020-11-142-12/+60
| | | | close #64
* fix: AVRTimerConfig interface not exported #65Uri Shaked2020-11-142-2/+8
| | | | close #65
* test(gpio): extract constantsUri Shaked2020-10-071-26/+30
|
* fix(gpio): Changing pinMode from `INPUT` to `INPUT_PULLUP` doesn't trigger ↵Uri Shaked2020-10-072-4/+13
| | | | | | listeners close #62
* fix(cpu): incorrect address for RAMPZ / EINDUri Shaked2020-09-302-8/+8
| | | | | | We used their I/O space address intead of their data space address. close #61
* perf(timer): speed up interrupt handlingUri Shaked2020-09-021-1/+4
|
* perf(timer): improve timer speedUri Shaked2020-09-022-11/+17
| | | | cache the value of the clock divider
* fix(interrupt): broken on ATmega2560Uri Shaked2020-09-022-1/+23
| | | | close #58
* fix(instruction): EICALL is brokenUri Shaked2020-09-022-1/+3
| | | | close #59
* style(spi): remove redundant eslint commentsUri Shaked2020-08-221-2/+0
|
* feat(spi): implement SPI master #33Uri Shaked2020-08-224-1/+368
| | | | close #33
* test(eeprom): remove useless lineUri Shaked2020-08-221-1/+0
|
* fix(timer): keeps counting even when stopped #41Uri Shaked2020-08-012-36/+51
|
* test(timer): use TestProgramRunnerUri Shaked2020-08-013-135/+128
|
* fix(eeprom): EEPROM write fails after first attemptUri Shaked2020-07-162-1/+33
| | | | close #54
* feat(eeprom): implement EEPROM peripheralUri Shaked2020-07-166-42/+408
| | | | close #15
* test(timer): remove stray console.logUri Shaked2020-07-161-1/+0
|
* test(twi): extract constantsUri Shaked2020-07-161-31/+46
| | | | This makes the test code more readable
* fix(usart): bitsPerChar looking at the wrong registerUri Shaked2020-07-092-7/+10
| | | | close #52
* fix(usart): TXC interrupt triggered incorrectlyUri Shaked2020-07-092-4/+18
| | | | close #51
* test(usart): extract constantsUri Shaked2020-07-091-49/+68
| | | | This makes the test code easier to read
* test(instruction): extract constantsUri Shaked2020-06-041-238/+274
| | | | This makes the test code easier to follow
* test(timer): extract constantsUri Shaked2020-05-301-133/+185
| | | | This makes the test code easier to follow
* fix(gpio): port state not updated on DDR writeUri Shaked2020-05-292-0/+15
| | | | | | Calling `pinState()` inside a GPIO port listener returns incorrect values after changing DDR close #47
* perf(timer): improve tick() performanceUri Shaked2020-05-251-3/+4
| | | | reduce the number of calls to TIFR/TIMSK getters
* feat(timer): Compare Match Output (#45)Uri Shaked2020-05-254-57/+342
| | | | | The Compare Match Output bits are used to generate hardware PWM signals on selected MCU pins. This is also the mechanism used by Arduino's analogWrite() method. See #32 for more details
* feat(gpio): add setPin() functionUri Shaked2020-05-102-0/+43
| | | | close #26
* fix(timer): stop Timer 2 when all CS bits are 0Uri Shaked2020-05-041-1/+1
| | | | close #44