aboutsummaryrefslogtreecommitdiff
path: root/src/gpio.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpio.ts')
-rw-r--r--src/gpio.ts48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/gpio.ts b/src/gpio.ts
index 7fdc915..d39a918 100644
--- a/src/gpio.ts
+++ b/src/gpio.ts
@@ -17,6 +17,12 @@ export interface AVRPortConfig {
export type GPIOListener = (value: u8, oldValue: u8) => void;
+export const portAConfig: AVRPortConfig = {
+ PIN: 0x20,
+ DDR: 0x21,
+ PORT: 0x22
+};
+
export const portBConfig: AVRPortConfig = {
PIN: 0x23,
DDR: 0x24,
@@ -35,6 +41,48 @@ export const portDConfig: AVRPortConfig = {
PORT: 0x2b
};
+export const portEConfig: AVRPortConfig = {
+ PIN: 0x2c,
+ DDR: 0x2d,
+ PORT: 0x2e
+};
+
+export const portFConfig: AVRPortConfig = {
+ PIN: 0x2f,
+ DDR: 0x30,
+ PORT: 0x31
+};
+
+export const portGConfig: AVRPortConfig = {
+ PIN: 0x32,
+ DDR: 0x33,
+ PORT: 0x34
+};
+
+export const portHConfig: AVRPortConfig = {
+ PIN: 0x100,
+ DDR: 0x101,
+ PORT: 0x102
+};
+
+export const portJConfig: AVRPortConfig = {
+ PIN: 0x103,
+ DDR: 0x104,
+ PORT: 0x105
+};
+
+export const portKConfig: AVRPortConfig = {
+ PIN: 0x106,
+ DDR: 0x107,
+ PORT: 0x108
+};
+
+export const portLConfig: AVRPortConfig = {
+ PIN: 0x109,
+ DDR: 0x10a,
+ PORT: 0x10b
+};
+
export class AVRIOPort {
private listeners: GPIOListener[] = [];