diff options
| author | Uri Shaked | 2019-12-07 22:18:00 +0200 |
|---|---|---|
| committer | Uri Shaked | 2019-12-07 22:18:00 +0200 |
| commit | 07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244 (patch) | |
| tree | 12a64bfbc4ea18997923f14b44725cb0e118c949 /src/usart.ts | |
| parent | feat: publish both CJS and ESM to npm (diff) | |
| download | avr8js-07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244.tar.gz avr8js-07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244.tar.bz2 avr8js-07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244.zip | |
refactor: tslint → eslint
Diffstat (limited to 'src/usart.ts')
| -rw-r--r-- | src/usart.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/usart.ts b/src/usart.ts index 8d5691c..6838736 100644 --- a/src/usart.ts +++ b/src/usart.ts @@ -30,7 +30,8 @@ export const usart0Config: USARTConfig = { export type USARTTransmitCallback = (value: u8) => void; export type USARTLineTransmitCallback = (value: string) => void; -// Register bits +/* eslint-disable @typescript-eslint/no-unused-vars */ +// Register bits: const UCSRA_RXC = 0x80; // USART Receive Complete const UCSRA_TXC = 0x40; // USART Transmit Complete const UCSRA_UDRE = 0x20; // USART Data Register Empty @@ -55,12 +56,13 @@ const UCSRC_USBS = 0x8; // Stop Bit Select const UCSRC_UCSZ1 = 0x4; // Character Size 1 const UCSRC_UCSZ0 = 0x2; // Character Size 0 const UCSRC_UCPOL = 0x1; // Clock Polarity +/* eslint-enable @typescript-eslint/no-unused-vars */ export class AVRUSART { public onByteTransmit: USARTTransmitCallback | null = null; public onLineTransmit: USARTLineTransmitCallback | null = null; - private lineBuffer: string = ''; + private lineBuffer = ''; constructor(private cpu: CPU, private config: USARTConfig, private freqMHz: number) { this.cpu.writeHooks[config.UCSRA] = (value) => { |
