rp2040js 0.17.16 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/clock/clock.d.ts +11 -11
- package/dist/cjs/clock/clock.js +2 -2
- package/dist/cjs/clock/mock-clock.d.ts +17 -17
- package/dist/cjs/clock/mock-clock.js +52 -52
- package/dist/cjs/clock/realtime-clock.d.ts +23 -23
- package/dist/cjs/clock/realtime-clock.js +73 -73
- package/dist/cjs/cortex-m0-core.d.ts +87 -87
- package/dist/cjs/cortex-m0-core.js +1251 -1251
- package/dist/cjs/gdb/gdb-connection.d.ts +11 -11
- package/dist/cjs/gdb/gdb-connection.js +57 -57
- package/dist/cjs/gdb/gdb-server.d.ts +23 -23
- package/dist/cjs/gdb/gdb-server.js +232 -232
- package/dist/cjs/gdb/gdb-tcp-server.d.ts +10 -10
- package/dist/cjs/gdb/gdb-tcp-server.js +34 -34
- package/dist/cjs/gdb/gdb-utils.d.ts +9 -9
- package/dist/cjs/gdb/gdb-utils.js +48 -48
- package/dist/cjs/gpio-pin.d.ts +56 -56
- package/dist/cjs/gpio-pin.js +216 -216
- package/dist/cjs/index.d.ts +11 -11
- package/dist/cjs/index.js +36 -36
- package/dist/cjs/interpolator.d.ts +36 -36
- package/dist/cjs/interpolator.js +150 -150
- package/dist/cjs/irq.d.ts +29 -29
- package/dist/cjs/irq.js +33 -33
- package/dist/cjs/peripherals/adc.d.ts +52 -52
- package/dist/cjs/peripherals/adc.js +261 -261
- package/dist/cjs/peripherals/busctrl.d.ts +10 -10
- package/dist/cjs/peripherals/busctrl.js +84 -84
- package/dist/cjs/peripherals/clocks.d.ts +9 -9
- package/dist/cjs/peripherals/clocks.js +42 -42
- package/dist/cjs/peripherals/dma.d.ts +109 -109
- package/dist/cjs/peripherals/dma.js +520 -520
- package/dist/cjs/peripherals/i2c.d.ts +54 -54
- package/dist/cjs/peripherals/i2c.js +458 -458
- package/dist/cjs/peripherals/io.d.ts +11 -11
- package/dist/cjs/peripherals/io.js +100 -100
- package/dist/cjs/peripherals/pads.d.ts +13 -13
- package/dist/cjs/peripherals/pads.js +58 -58
- package/dist/cjs/peripherals/peripheral.d.ts +22 -22
- package/dist/cjs/peripherals/peripheral.js +61 -61
- package/dist/cjs/peripherals/pio.d.ts +120 -120
- package/dist/cjs/peripherals/pio.js +1086 -1086
- package/dist/cjs/peripherals/ppb.d.ts +25 -25
- package/dist/cjs/peripherals/ppb.js +229 -229
- package/dist/cjs/peripherals/pwm.d.ts +65 -65
- package/dist/cjs/peripherals/pwm.js +372 -372
- package/dist/cjs/peripherals/reset.d.ts +8 -8
- package/dist/cjs/peripherals/reset.js +40 -40
- package/dist/cjs/peripherals/rtc.d.ts +10 -10
- package/dist/cjs/peripherals/rtc.js +74 -74
- package/dist/cjs/peripherals/spi.d.ts +38 -30
- package/dist/cjs/peripherals/spi.js +240 -218
- package/dist/cjs/peripherals/ssi.d.ts +6 -6
- package/dist/cjs/peripherals/ssi.js +43 -43
- package/dist/cjs/peripherals/syscfg.d.ts +5 -5
- package/dist/cjs/peripherals/syscfg.js +26 -26
- package/dist/cjs/peripherals/sysinfo.d.ts +4 -4
- package/dist/cjs/peripherals/sysinfo.js +22 -22
- package/dist/cjs/peripherals/tbman.d.ts +4 -4
- package/dist/cjs/peripherals/tbman.js +17 -17
- package/dist/cjs/peripherals/timer.d.ts +18 -18
- package/dist/cjs/peripherals/timer.js +156 -156
- package/dist/cjs/peripherals/uart.d.ts +31 -28
- package/dist/cjs/peripherals/uart.js +132 -135
- package/dist/cjs/peripherals/usb.d.ts +29 -29
- package/dist/cjs/peripherals/usb.js +309 -309
- package/dist/cjs/rp2040.d.ts +71 -71
- package/dist/cjs/rp2040.js +361 -346
- package/dist/cjs/sio.d.ts +21 -21
- package/dist/cjs/sio.js +425 -425
- package/dist/cjs/usb/cdc.d.ts +20 -20
- package/dist/cjs/usb/cdc.js +126 -126
- package/dist/cjs/usb/interfaces.d.ts +47 -47
- package/dist/cjs/usb/interfaces.js +46 -46
- package/dist/cjs/usb/setup.d.ts +5 -5
- package/dist/cjs/usb/setup.js +53 -53
- package/dist/cjs/utils/assembler.d.ts +79 -79
- package/dist/cjs/utils/assembler.js +328 -328
- package/dist/cjs/utils/bit.d.ts +3 -3
- package/dist/cjs/utils/bit.js +15 -15
- package/dist/cjs/utils/fifo.d.ts +15 -15
- package/dist/cjs/utils/fifo.js +56 -56
- package/dist/cjs/utils/logging.d.ts +23 -23
- package/dist/cjs/utils/logging.js +48 -48
- package/dist/cjs/utils/pio-assembler.d.ts +45 -45
- package/dist/cjs/utils/pio-assembler.js +87 -87
- package/dist/cjs/utils/time.d.ts +2 -2
- package/dist/cjs/utils/time.js +32 -32
- package/dist/cjs/utils/timer32.d.ts +57 -57
- package/dist/cjs/utils/timer32.js +208 -208
- package/dist/esm/clock/clock.d.ts +11 -11
- package/dist/esm/clock/clock.js +1 -1
- package/dist/esm/clock/mock-clock.d.ts +17 -17
- package/dist/esm/clock/mock-clock.js +47 -47
- package/dist/esm/clock/realtime-clock.d.ts +23 -23
- package/dist/esm/clock/realtime-clock.js +68 -68
- package/dist/esm/cortex-m0-core.d.ts +87 -87
- package/dist/esm/cortex-m0-core.js +1247 -1247
- package/dist/esm/gdb/gdb-connection.d.ts +11 -11
- package/dist/esm/gdb/gdb-connection.js +53 -53
- package/dist/esm/gdb/gdb-server.d.ts +23 -23
- package/dist/esm/gdb/gdb-server.js +228 -228
- package/dist/esm/gdb/gdb-tcp-server.d.ts +10 -10
- package/dist/esm/gdb/gdb-tcp-server.js +30 -30
- package/dist/esm/gdb/gdb-utils.d.ts +9 -9
- package/dist/esm/gdb/gdb-utils.js +36 -36
- package/dist/esm/gpio-pin.d.ts +56 -56
- package/dist/esm/gpio-pin.js +212 -212
- package/dist/esm/index.d.ts +11 -11
- package/dist/esm/index.js +11 -11
- package/dist/esm/interpolator.d.ts +36 -36
- package/dist/esm/interpolator.js +145 -145
- package/dist/esm/irq.d.ts +29 -29
- package/dist/esm/irq.js +30 -30
- package/dist/esm/peripherals/adc.d.ts +52 -52
- package/dist/esm/peripherals/adc.js +257 -257
- package/dist/esm/peripherals/busctrl.d.ts +10 -10
- package/dist/esm/peripherals/busctrl.js +80 -80
- package/dist/esm/peripherals/clocks.d.ts +9 -9
- package/dist/esm/peripherals/clocks.js +38 -38
- package/dist/esm/peripherals/dma.d.ts +109 -109
- package/dist/esm/peripherals/dma.js +515 -515
- package/dist/esm/peripherals/i2c.d.ts +54 -54
- package/dist/esm/peripherals/i2c.js +454 -454
- package/dist/esm/peripherals/io.d.ts +11 -11
- package/dist/esm/peripherals/io.js +96 -96
- package/dist/esm/peripherals/pads.d.ts +13 -13
- package/dist/esm/peripherals/pads.js +54 -54
- package/dist/esm/peripherals/peripheral.d.ts +22 -22
- package/dist/esm/peripherals/peripheral.js +55 -55
- package/dist/esm/peripherals/pio.d.ts +120 -120
- package/dist/esm/peripherals/pio.js +1081 -1081
- package/dist/esm/peripherals/ppb.d.ts +25 -25
- package/dist/esm/peripherals/ppb.js +225 -225
- package/dist/esm/peripherals/pwm.d.ts +65 -65
- package/dist/esm/peripherals/pwm.js +368 -368
- package/dist/esm/peripherals/reset.d.ts +8 -8
- package/dist/esm/peripherals/reset.js +36 -36
- package/dist/esm/peripherals/rtc.d.ts +10 -10
- package/dist/esm/peripherals/rtc.js +70 -70
- package/dist/esm/peripherals/spi.d.ts +38 -30
- package/dist/esm/peripherals/spi.js +236 -214
- package/dist/esm/peripherals/ssi.d.ts +6 -6
- package/dist/esm/peripherals/ssi.js +39 -39
- package/dist/esm/peripherals/syscfg.d.ts +5 -5
- package/dist/esm/peripherals/syscfg.js +22 -22
- package/dist/esm/peripherals/sysinfo.d.ts +4 -4
- package/dist/esm/peripherals/sysinfo.js +18 -18
- package/dist/esm/peripherals/tbman.d.ts +4 -4
- package/dist/esm/peripherals/tbman.js +13 -13
- package/dist/esm/peripherals/timer.d.ts +18 -18
- package/dist/esm/peripherals/timer.js +152 -152
- package/dist/esm/peripherals/uart.d.ts +31 -28
- package/dist/esm/peripherals/uart.js +128 -131
- package/dist/esm/peripherals/usb.d.ts +29 -29
- package/dist/esm/peripherals/usb.js +305 -305
- package/dist/esm/rp2040.d.ts +71 -71
- package/dist/esm/rp2040.js +357 -342
- package/dist/esm/sio.d.ts +21 -21
- package/dist/esm/sio.js +421 -421
- package/dist/esm/usb/cdc.d.ts +20 -20
- package/dist/esm/usb/cdc.js +121 -121
- package/dist/esm/usb/interfaces.d.ts +47 -47
- package/dist/esm/usb/interfaces.js +43 -43
- package/dist/esm/usb/setup.d.ts +5 -5
- package/dist/esm/usb/setup.js +46 -46
- package/dist/esm/utils/assembler.d.ts +79 -79
- package/dist/esm/utils/assembler.js +245 -245
- package/dist/esm/utils/bit.d.ts +3 -3
- package/dist/esm/utils/bit.js +9 -9
- package/dist/esm/utils/fifo.d.ts +15 -15
- package/dist/esm/utils/fifo.js +52 -52
- package/dist/esm/utils/logging.d.ts +23 -23
- package/dist/esm/utils/logging.js +44 -44
- package/dist/esm/utils/pio-assembler.d.ts +45 -45
- package/dist/esm/utils/pio-assembler.js +75 -75
- package/dist/esm/utils/time.d.ts +2 -2
- package/dist/esm/utils/time.js +27 -27
- package/dist/esm/utils/timer32.d.ts +57 -57
- package/dist/esm/utils/timer32.js +203 -203
- package/package.json +34 -22
- package/dist/esm/package.json +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogLevel = exports.ConsoleLogger = exports.setDeviceConfigurationPacket = exports.setDeviceAddressPacket = exports.getDescriptorPacket = exports.createSetupPacket = exports.SetupType = exports.SetupRequest = exports.SetupRecipient = exports.DescriptorType = exports.DataDirection = exports.USBCDC = exports.RP2040 = exports.RPUSBController = exports.I2CMode = exports.I2CSpeed = exports.RPI2C = exports.BasePeripheral = exports.GPIOPinState = exports.GPIOPin = exports.GDBServer = exports.GDBConnection = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "GDBConnection", { enumerable: true, get: function () { return
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "GDBServer", { enumerable: true, get: function () { return
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "GPIOPin", { enumerable: true, get: function () { return
|
|
10
|
-
Object.defineProperty(exports, "GPIOPinState", { enumerable: true, get: function () { return
|
|
11
|
-
var
|
|
12
|
-
Object.defineProperty(exports, "BasePeripheral", { enumerable: true, get: function () { return
|
|
13
|
-
var
|
|
14
|
-
Object.defineProperty(exports, "RPI2C", { enumerable: true, get: function () { return
|
|
15
|
-
Object.defineProperty(exports, "I2CSpeed", { enumerable: true, get: function () { return
|
|
16
|
-
Object.defineProperty(exports, "I2CMode", { enumerable: true, get: function () { return
|
|
17
|
-
var
|
|
18
|
-
Object.defineProperty(exports, "RPUSBController", { enumerable: true, get: function () { return
|
|
19
|
-
var
|
|
20
|
-
Object.defineProperty(exports, "RP2040", { enumerable: true, get: function () { return
|
|
21
|
-
var
|
|
22
|
-
Object.defineProperty(exports, "USBCDC", { enumerable: true, get: function () { return
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "DataDirection", { enumerable: true, get: function () { return
|
|
25
|
-
Object.defineProperty(exports, "DescriptorType", { enumerable: true, get: function () { return
|
|
26
|
-
Object.defineProperty(exports, "SetupRecipient", { enumerable: true, get: function () { return
|
|
27
|
-
Object.defineProperty(exports, "SetupRequest", { enumerable: true, get: function () { return
|
|
28
|
-
Object.defineProperty(exports, "SetupType", { enumerable: true, get: function () { return
|
|
29
|
-
var
|
|
30
|
-
Object.defineProperty(exports, "createSetupPacket", { enumerable: true, get: function () { return
|
|
31
|
-
Object.defineProperty(exports, "getDescriptorPacket", { enumerable: true, get: function () { return
|
|
32
|
-
Object.defineProperty(exports, "setDeviceAddressPacket", { enumerable: true, get: function () { return
|
|
33
|
-
Object.defineProperty(exports, "setDeviceConfigurationPacket", { enumerable: true, get: function () { return
|
|
34
|
-
var
|
|
35
|
-
Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return
|
|
36
|
-
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevel = exports.ConsoleLogger = exports.setDeviceConfigurationPacket = exports.setDeviceAddressPacket = exports.getDescriptorPacket = exports.createSetupPacket = exports.SetupType = exports.SetupRequest = exports.SetupRecipient = exports.DescriptorType = exports.DataDirection = exports.USBCDC = exports.RP2040 = exports.RPUSBController = exports.I2CMode = exports.I2CSpeed = exports.RPI2C = exports.BasePeripheral = exports.GPIOPinState = exports.GPIOPin = exports.GDBServer = exports.GDBConnection = void 0;
|
|
4
|
+
var gdb_connection_js_1 = require("./gdb/gdb-connection.js");
|
|
5
|
+
Object.defineProperty(exports, "GDBConnection", { enumerable: true, get: function () { return gdb_connection_js_1.GDBConnection; } });
|
|
6
|
+
var gdb_server_js_1 = require("./gdb/gdb-server.js");
|
|
7
|
+
Object.defineProperty(exports, "GDBServer", { enumerable: true, get: function () { return gdb_server_js_1.GDBServer; } });
|
|
8
|
+
var gpio_pin_js_1 = require("./gpio-pin.js");
|
|
9
|
+
Object.defineProperty(exports, "GPIOPin", { enumerable: true, get: function () { return gpio_pin_js_1.GPIOPin; } });
|
|
10
|
+
Object.defineProperty(exports, "GPIOPinState", { enumerable: true, get: function () { return gpio_pin_js_1.GPIOPinState; } });
|
|
11
|
+
var peripheral_js_1 = require("./peripherals/peripheral.js");
|
|
12
|
+
Object.defineProperty(exports, "BasePeripheral", { enumerable: true, get: function () { return peripheral_js_1.BasePeripheral; } });
|
|
13
|
+
var i2c_js_1 = require("./peripherals/i2c.js");
|
|
14
|
+
Object.defineProperty(exports, "RPI2C", { enumerable: true, get: function () { return i2c_js_1.RPI2C; } });
|
|
15
|
+
Object.defineProperty(exports, "I2CSpeed", { enumerable: true, get: function () { return i2c_js_1.I2CSpeed; } });
|
|
16
|
+
Object.defineProperty(exports, "I2CMode", { enumerable: true, get: function () { return i2c_js_1.I2CMode; } });
|
|
17
|
+
var usb_js_1 = require("./peripherals/usb.js");
|
|
18
|
+
Object.defineProperty(exports, "RPUSBController", { enumerable: true, get: function () { return usb_js_1.RPUSBController; } });
|
|
19
|
+
var rp2040_js_1 = require("./rp2040.js");
|
|
20
|
+
Object.defineProperty(exports, "RP2040", { enumerable: true, get: function () { return rp2040_js_1.RP2040; } });
|
|
21
|
+
var cdc_js_1 = require("./usb/cdc.js");
|
|
22
|
+
Object.defineProperty(exports, "USBCDC", { enumerable: true, get: function () { return cdc_js_1.USBCDC; } });
|
|
23
|
+
var interfaces_js_1 = require("./usb/interfaces.js");
|
|
24
|
+
Object.defineProperty(exports, "DataDirection", { enumerable: true, get: function () { return interfaces_js_1.DataDirection; } });
|
|
25
|
+
Object.defineProperty(exports, "DescriptorType", { enumerable: true, get: function () { return interfaces_js_1.DescriptorType; } });
|
|
26
|
+
Object.defineProperty(exports, "SetupRecipient", { enumerable: true, get: function () { return interfaces_js_1.SetupRecipient; } });
|
|
27
|
+
Object.defineProperty(exports, "SetupRequest", { enumerable: true, get: function () { return interfaces_js_1.SetupRequest; } });
|
|
28
|
+
Object.defineProperty(exports, "SetupType", { enumerable: true, get: function () { return interfaces_js_1.SetupType; } });
|
|
29
|
+
var setup_js_1 = require("./usb/setup.js");
|
|
30
|
+
Object.defineProperty(exports, "createSetupPacket", { enumerable: true, get: function () { return setup_js_1.createSetupPacket; } });
|
|
31
|
+
Object.defineProperty(exports, "getDescriptorPacket", { enumerable: true, get: function () { return setup_js_1.getDescriptorPacket; } });
|
|
32
|
+
Object.defineProperty(exports, "setDeviceAddressPacket", { enumerable: true, get: function () { return setup_js_1.setDeviceAddressPacket; } });
|
|
33
|
+
Object.defineProperty(exports, "setDeviceConfigurationPacket", { enumerable: true, get: function () { return setup_js_1.setDeviceConfigurationPacket; } });
|
|
34
|
+
var logging_js_1 = require("./utils/logging.js");
|
|
35
|
+
Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return logging_js_1.ConsoleLogger; } });
|
|
36
|
+
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return logging_js_1.LogLevel; } });
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export declare class InterpolatorConfig {
|
|
2
|
-
shift: number;
|
|
3
|
-
maskLSB: number;
|
|
4
|
-
maskMSB: number;
|
|
5
|
-
signed: boolean;
|
|
6
|
-
crossInput: boolean;
|
|
7
|
-
crossResult: boolean;
|
|
8
|
-
addRaw: boolean;
|
|
9
|
-
forceMSB: number;
|
|
10
|
-
blend: boolean;
|
|
11
|
-
clamp: boolean;
|
|
12
|
-
overf0: boolean;
|
|
13
|
-
overf1: boolean;
|
|
14
|
-
overf: boolean;
|
|
15
|
-
constructor(value: number);
|
|
16
|
-
toUint32(): number;
|
|
17
|
-
}
|
|
18
|
-
export declare class Interpolator {
|
|
19
|
-
private readonly index;
|
|
20
|
-
accum0: number;
|
|
21
|
-
accum1: number;
|
|
22
|
-
base0: number;
|
|
23
|
-
base1: number;
|
|
24
|
-
base2: number;
|
|
25
|
-
ctrl0: number;
|
|
26
|
-
ctrl1: number;
|
|
27
|
-
result0: number;
|
|
28
|
-
result1: number;
|
|
29
|
-
result2: number;
|
|
30
|
-
smresult0: number;
|
|
31
|
-
smresult1: number;
|
|
32
|
-
constructor(index: number);
|
|
33
|
-
update(): void;
|
|
34
|
-
writeback(): void;
|
|
35
|
-
setBase01(value: number): void;
|
|
36
|
-
}
|
|
1
|
+
export declare class InterpolatorConfig {
|
|
2
|
+
shift: number;
|
|
3
|
+
maskLSB: number;
|
|
4
|
+
maskMSB: number;
|
|
5
|
+
signed: boolean;
|
|
6
|
+
crossInput: boolean;
|
|
7
|
+
crossResult: boolean;
|
|
8
|
+
addRaw: boolean;
|
|
9
|
+
forceMSB: number;
|
|
10
|
+
blend: boolean;
|
|
11
|
+
clamp: boolean;
|
|
12
|
+
overf0: boolean;
|
|
13
|
+
overf1: boolean;
|
|
14
|
+
overf: boolean;
|
|
15
|
+
constructor(value: number);
|
|
16
|
+
toUint32(): number;
|
|
17
|
+
}
|
|
18
|
+
export declare class Interpolator {
|
|
19
|
+
private readonly index;
|
|
20
|
+
accum0: number;
|
|
21
|
+
accum1: number;
|
|
22
|
+
base0: number;
|
|
23
|
+
base1: number;
|
|
24
|
+
base2: number;
|
|
25
|
+
ctrl0: number;
|
|
26
|
+
ctrl1: number;
|
|
27
|
+
result0: number;
|
|
28
|
+
result1: number;
|
|
29
|
+
result2: number;
|
|
30
|
+
smresult0: number;
|
|
31
|
+
smresult1: number;
|
|
32
|
+
constructor(index: number);
|
|
33
|
+
update(): void;
|
|
34
|
+
writeback(): void;
|
|
35
|
+
setBase01(value: number): void;
|
|
36
|
+
}
|
package/dist/cjs/interpolator.js
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Interpolator = exports.InterpolatorConfig = void 0;
|
|
4
|
-
const
|
|
5
|
-
class InterpolatorConfig {
|
|
6
|
-
constructor(value) {
|
|
7
|
-
this.shift = 0;
|
|
8
|
-
this.maskLSB = 0;
|
|
9
|
-
this.maskMSB = 0;
|
|
10
|
-
this.signed = false;
|
|
11
|
-
this.crossInput = false;
|
|
12
|
-
this.crossResult = false;
|
|
13
|
-
this.addRaw = false;
|
|
14
|
-
this.forceMSB = 0;
|
|
15
|
-
this.blend = false;
|
|
16
|
-
this.clamp = false;
|
|
17
|
-
this.overf0 = false;
|
|
18
|
-
this.overf1 = false;
|
|
19
|
-
this.overf = false;
|
|
20
|
-
this.shift = (value >>> 0) & 0b11111;
|
|
21
|
-
this.maskLSB = (value >>> 5) & 0b11111;
|
|
22
|
-
this.maskMSB = (value >>> 10) & 0b11111;
|
|
23
|
-
this.signed = Boolean((value >>> 15) & 1);
|
|
24
|
-
this.crossInput = Boolean((value >>> 16) & 1);
|
|
25
|
-
this.crossResult = Boolean((value >>> 17) & 1);
|
|
26
|
-
this.addRaw = Boolean((value >>> 18) & 1);
|
|
27
|
-
this.forceMSB = (value >>> 19) & 0b11;
|
|
28
|
-
this.blend = Boolean((value >>> 21) & 1);
|
|
29
|
-
this.clamp = Boolean((value >>> 22) & 1);
|
|
30
|
-
this.overf0 = Boolean((value >>> 23) & 1);
|
|
31
|
-
this.overf1 = Boolean((value >>> 24) & 1);
|
|
32
|
-
this.overf = Boolean((value >>> 25) & 1);
|
|
33
|
-
}
|
|
34
|
-
toUint32() {
|
|
35
|
-
return (((this.shift & 0b11111) << 0) |
|
|
36
|
-
((this.maskLSB & 0b11111) << 5) |
|
|
37
|
-
((this.maskMSB & 0b11111) << 10) |
|
|
38
|
-
((Number(this.signed) & 1) << 15) |
|
|
39
|
-
((Number(this.crossInput) & 1) << 16) |
|
|
40
|
-
((Number(this.crossResult) & 1) << 17) |
|
|
41
|
-
((Number(this.addRaw) & 1) << 18) |
|
|
42
|
-
((this.forceMSB & 0b11) << 19) |
|
|
43
|
-
((Number(this.blend) & 1) << 21) |
|
|
44
|
-
((Number(this.clamp) & 1) << 22) |
|
|
45
|
-
((Number(this.overf0) & 1) << 23) |
|
|
46
|
-
((Number(this.overf1) & 1) << 24) |
|
|
47
|
-
((Number(this.overf) & 1) << 25));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.InterpolatorConfig = InterpolatorConfig;
|
|
51
|
-
class Interpolator {
|
|
52
|
-
constructor(index) {
|
|
53
|
-
this.index = index;
|
|
54
|
-
this.accum0 = 0;
|
|
55
|
-
this.accum1 = 0;
|
|
56
|
-
this.base0 = 0;
|
|
57
|
-
this.base1 = 0;
|
|
58
|
-
this.base2 = 0;
|
|
59
|
-
this.ctrl0 = 0;
|
|
60
|
-
this.ctrl1 = 0;
|
|
61
|
-
this.result0 = 0;
|
|
62
|
-
this.result1 = 0;
|
|
63
|
-
this.result2 = 0;
|
|
64
|
-
this.smresult0 = 0;
|
|
65
|
-
this.smresult1 = 0;
|
|
66
|
-
this.update();
|
|
67
|
-
}
|
|
68
|
-
update() {
|
|
69
|
-
const N = this.index;
|
|
70
|
-
const ctrl0 = new InterpolatorConfig(this.ctrl0);
|
|
71
|
-
const ctrl1 = new InterpolatorConfig(this.ctrl1);
|
|
72
|
-
const do_clamp = ctrl0.clamp && N == 1;
|
|
73
|
-
const do_blend = ctrl0.blend && N == 0;
|
|
74
|
-
ctrl0.clamp = do_clamp;
|
|
75
|
-
ctrl0.blend = do_blend;
|
|
76
|
-
ctrl1.clamp = false;
|
|
77
|
-
ctrl1.blend = false;
|
|
78
|
-
ctrl1.overf0 = false;
|
|
79
|
-
ctrl1.overf1 = false;
|
|
80
|
-
ctrl1.overf = false;
|
|
81
|
-
const input0 =
|
|
82
|
-
const input1 =
|
|
83
|
-
const msbmask0 = ctrl0.maskMSB == 31 ? 0xffffffff : (1 << (ctrl0.maskMSB + 1)) - 1;
|
|
84
|
-
const msbmask1 = ctrl1.maskMSB == 31 ? 0xffffffff : (1 << (ctrl1.maskMSB + 1)) - 1;
|
|
85
|
-
const mask0 = msbmask0 & ~((1 << ctrl0.maskLSB) - 1);
|
|
86
|
-
const mask1 = msbmask1 & ~((1 << ctrl1.maskLSB) - 1);
|
|
87
|
-
const uresult0 = (input0 >>> ctrl0.shift) & mask0;
|
|
88
|
-
const uresult1 = (input1 >>> ctrl1.shift) & mask1;
|
|
89
|
-
const overf0 = Boolean((input0 >>> ctrl0.shift) & ~msbmask0);
|
|
90
|
-
const overf1 = Boolean((input1 >>> ctrl1.shift) & ~msbmask1);
|
|
91
|
-
const overf = overf0 || overf1;
|
|
92
|
-
const sextmask0 = uresult0 & (1 << ctrl0.maskMSB) ? -1 << ctrl0.maskMSB : 0;
|
|
93
|
-
const sextmask1 = uresult1 & (1 << ctrl1.maskMSB) ? -1 << ctrl1.maskMSB : 0;
|
|
94
|
-
const sresult0 = uresult0 | sextmask0;
|
|
95
|
-
const sresult1 = uresult1 | sextmask1;
|
|
96
|
-
const result0 = ctrl0.signed ? sresult0 : uresult0;
|
|
97
|
-
const result1 = ctrl1.signed ? sresult1 : uresult1;
|
|
98
|
-
const addresult0 = this.base0 + (ctrl0.addRaw ? input0 : result0);
|
|
99
|
-
const addresult1 = this.base1 + (ctrl1.addRaw ? input1 : result1);
|
|
100
|
-
const addresult2 = this.base2 + result0 + (do_blend ? 0 : result1);
|
|
101
|
-
const uclamp0 =
|
|
102
|
-
? this.base0
|
|
103
|
-
:
|
|
104
|
-
? this.base1
|
|
105
|
-
: result0;
|
|
106
|
-
const sclamp0 =
|
|
107
|
-
? this.base0
|
|
108
|
-
:
|
|
109
|
-
? this.base1
|
|
110
|
-
: result0;
|
|
111
|
-
const clamp0 = ctrl0.signed ? sclamp0 : uclamp0;
|
|
112
|
-
const alpha1 = result1 & 0xff;
|
|
113
|
-
const ublend1 =
|
|
114
|
-
const sblend1 =
|
|
115
|
-
const blend1 = ctrl1.signed ? sblend1 : ublend1;
|
|
116
|
-
this.smresult0 =
|
|
117
|
-
this.smresult1 =
|
|
118
|
-
this.result0 =
|
|
119
|
-
this.result1 =
|
|
120
|
-
this.result2 =
|
|
121
|
-
ctrl0.overf0 = overf0;
|
|
122
|
-
ctrl0.overf1 = overf1;
|
|
123
|
-
ctrl0.overf = overf;
|
|
124
|
-
this.ctrl0 = ctrl0.toUint32();
|
|
125
|
-
this.ctrl1 = ctrl1.toUint32();
|
|
126
|
-
}
|
|
127
|
-
writeback() {
|
|
128
|
-
const ctrl0 = new InterpolatorConfig(this.ctrl0);
|
|
129
|
-
const ctrl1 = new InterpolatorConfig(this.ctrl1);
|
|
130
|
-
this.accum0 =
|
|
131
|
-
this.accum1 =
|
|
132
|
-
this.update();
|
|
133
|
-
}
|
|
134
|
-
setBase01(value) {
|
|
135
|
-
const N = this.index;
|
|
136
|
-
const ctrl0 = new InterpolatorConfig(this.ctrl0);
|
|
137
|
-
const ctrl1 = new InterpolatorConfig(this.ctrl1);
|
|
138
|
-
const do_blend = ctrl0.blend && N == 0;
|
|
139
|
-
const input0 = value & 0xffff;
|
|
140
|
-
const input1 = (value >>> 16) & 0xffff;
|
|
141
|
-
const sextmask0 = input0 & (1 << 15) ? -1 << 15 : 0;
|
|
142
|
-
const sextmask1 = input1 & (1 << 15) ? -1 << 15 : 0;
|
|
143
|
-
const base0 = (do_blend ? ctrl1.signed : ctrl0.signed) ? input0 | sextmask0 : input0;
|
|
144
|
-
const base1 = ctrl1.signed ? input1 | sextmask1 : input1;
|
|
145
|
-
this.base0 =
|
|
146
|
-
this.base1 =
|
|
147
|
-
this.update();
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
exports.Interpolator = Interpolator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Interpolator = exports.InterpolatorConfig = void 0;
|
|
4
|
+
const bit_js_1 = require("./utils/bit.js");
|
|
5
|
+
class InterpolatorConfig {
|
|
6
|
+
constructor(value) {
|
|
7
|
+
this.shift = 0;
|
|
8
|
+
this.maskLSB = 0;
|
|
9
|
+
this.maskMSB = 0;
|
|
10
|
+
this.signed = false;
|
|
11
|
+
this.crossInput = false;
|
|
12
|
+
this.crossResult = false;
|
|
13
|
+
this.addRaw = false;
|
|
14
|
+
this.forceMSB = 0;
|
|
15
|
+
this.blend = false;
|
|
16
|
+
this.clamp = false;
|
|
17
|
+
this.overf0 = false;
|
|
18
|
+
this.overf1 = false;
|
|
19
|
+
this.overf = false;
|
|
20
|
+
this.shift = (value >>> 0) & 0b11111;
|
|
21
|
+
this.maskLSB = (value >>> 5) & 0b11111;
|
|
22
|
+
this.maskMSB = (value >>> 10) & 0b11111;
|
|
23
|
+
this.signed = Boolean((value >>> 15) & 1);
|
|
24
|
+
this.crossInput = Boolean((value >>> 16) & 1);
|
|
25
|
+
this.crossResult = Boolean((value >>> 17) & 1);
|
|
26
|
+
this.addRaw = Boolean((value >>> 18) & 1);
|
|
27
|
+
this.forceMSB = (value >>> 19) & 0b11;
|
|
28
|
+
this.blend = Boolean((value >>> 21) & 1);
|
|
29
|
+
this.clamp = Boolean((value >>> 22) & 1);
|
|
30
|
+
this.overf0 = Boolean((value >>> 23) & 1);
|
|
31
|
+
this.overf1 = Boolean((value >>> 24) & 1);
|
|
32
|
+
this.overf = Boolean((value >>> 25) & 1);
|
|
33
|
+
}
|
|
34
|
+
toUint32() {
|
|
35
|
+
return (((this.shift & 0b11111) << 0) |
|
|
36
|
+
((this.maskLSB & 0b11111) << 5) |
|
|
37
|
+
((this.maskMSB & 0b11111) << 10) |
|
|
38
|
+
((Number(this.signed) & 1) << 15) |
|
|
39
|
+
((Number(this.crossInput) & 1) << 16) |
|
|
40
|
+
((Number(this.crossResult) & 1) << 17) |
|
|
41
|
+
((Number(this.addRaw) & 1) << 18) |
|
|
42
|
+
((this.forceMSB & 0b11) << 19) |
|
|
43
|
+
((Number(this.blend) & 1) << 21) |
|
|
44
|
+
((Number(this.clamp) & 1) << 22) |
|
|
45
|
+
((Number(this.overf0) & 1) << 23) |
|
|
46
|
+
((Number(this.overf1) & 1) << 24) |
|
|
47
|
+
((Number(this.overf) & 1) << 25));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.InterpolatorConfig = InterpolatorConfig;
|
|
51
|
+
class Interpolator {
|
|
52
|
+
constructor(index) {
|
|
53
|
+
this.index = index;
|
|
54
|
+
this.accum0 = 0;
|
|
55
|
+
this.accum1 = 0;
|
|
56
|
+
this.base0 = 0;
|
|
57
|
+
this.base1 = 0;
|
|
58
|
+
this.base2 = 0;
|
|
59
|
+
this.ctrl0 = 0;
|
|
60
|
+
this.ctrl1 = 0;
|
|
61
|
+
this.result0 = 0;
|
|
62
|
+
this.result1 = 0;
|
|
63
|
+
this.result2 = 0;
|
|
64
|
+
this.smresult0 = 0;
|
|
65
|
+
this.smresult1 = 0;
|
|
66
|
+
this.update();
|
|
67
|
+
}
|
|
68
|
+
update() {
|
|
69
|
+
const N = this.index;
|
|
70
|
+
const ctrl0 = new InterpolatorConfig(this.ctrl0);
|
|
71
|
+
const ctrl1 = new InterpolatorConfig(this.ctrl1);
|
|
72
|
+
const do_clamp = ctrl0.clamp && N == 1;
|
|
73
|
+
const do_blend = ctrl0.blend && N == 0;
|
|
74
|
+
ctrl0.clamp = do_clamp;
|
|
75
|
+
ctrl0.blend = do_blend;
|
|
76
|
+
ctrl1.clamp = false;
|
|
77
|
+
ctrl1.blend = false;
|
|
78
|
+
ctrl1.overf0 = false;
|
|
79
|
+
ctrl1.overf1 = false;
|
|
80
|
+
ctrl1.overf = false;
|
|
81
|
+
const input0 = (0, bit_js_1.s32)(ctrl0.crossInput ? this.accum1 : this.accum0);
|
|
82
|
+
const input1 = (0, bit_js_1.s32)(ctrl1.crossInput ? this.accum0 : this.accum1);
|
|
83
|
+
const msbmask0 = ctrl0.maskMSB == 31 ? 0xffffffff : (1 << (ctrl0.maskMSB + 1)) - 1;
|
|
84
|
+
const msbmask1 = ctrl1.maskMSB == 31 ? 0xffffffff : (1 << (ctrl1.maskMSB + 1)) - 1;
|
|
85
|
+
const mask0 = msbmask0 & ~((1 << ctrl0.maskLSB) - 1);
|
|
86
|
+
const mask1 = msbmask1 & ~((1 << ctrl1.maskLSB) - 1);
|
|
87
|
+
const uresult0 = (input0 >>> ctrl0.shift) & mask0;
|
|
88
|
+
const uresult1 = (input1 >>> ctrl1.shift) & mask1;
|
|
89
|
+
const overf0 = Boolean((input0 >>> ctrl0.shift) & ~msbmask0);
|
|
90
|
+
const overf1 = Boolean((input1 >>> ctrl1.shift) & ~msbmask1);
|
|
91
|
+
const overf = overf0 || overf1;
|
|
92
|
+
const sextmask0 = uresult0 & (1 << ctrl0.maskMSB) ? -1 << ctrl0.maskMSB : 0;
|
|
93
|
+
const sextmask1 = uresult1 & (1 << ctrl1.maskMSB) ? -1 << ctrl1.maskMSB : 0;
|
|
94
|
+
const sresult0 = uresult0 | sextmask0;
|
|
95
|
+
const sresult1 = uresult1 | sextmask1;
|
|
96
|
+
const result0 = ctrl0.signed ? sresult0 : uresult0;
|
|
97
|
+
const result1 = ctrl1.signed ? sresult1 : uresult1;
|
|
98
|
+
const addresult0 = this.base0 + (ctrl0.addRaw ? input0 : result0);
|
|
99
|
+
const addresult1 = this.base1 + (ctrl1.addRaw ? input1 : result1);
|
|
100
|
+
const addresult2 = this.base2 + result0 + (do_blend ? 0 : result1);
|
|
101
|
+
const uclamp0 = (0, bit_js_1.u32)(result0) < (0, bit_js_1.u32)(this.base0)
|
|
102
|
+
? this.base0
|
|
103
|
+
: (0, bit_js_1.u32)(result0) > (0, bit_js_1.u32)(this.base1)
|
|
104
|
+
? this.base1
|
|
105
|
+
: result0;
|
|
106
|
+
const sclamp0 = (0, bit_js_1.s32)(result0) < (0, bit_js_1.s32)(this.base0)
|
|
107
|
+
? this.base0
|
|
108
|
+
: (0, bit_js_1.s32)(result0) > (0, bit_js_1.s32)(this.base1)
|
|
109
|
+
? this.base1
|
|
110
|
+
: result0;
|
|
111
|
+
const clamp0 = ctrl0.signed ? sclamp0 : uclamp0;
|
|
112
|
+
const alpha1 = result1 & 0xff;
|
|
113
|
+
const ublend1 = (0, bit_js_1.u32)(this.base0) + (Math.floor((alpha1 * ((0, bit_js_1.u32)(this.base1) - (0, bit_js_1.u32)(this.base0))) / 256) | 0);
|
|
114
|
+
const sblend1 = (0, bit_js_1.s32)(this.base0) + (Math.floor((alpha1 * ((0, bit_js_1.s32)(this.base1) - (0, bit_js_1.s32)(this.base0))) / 256) | 0);
|
|
115
|
+
const blend1 = ctrl1.signed ? sblend1 : ublend1;
|
|
116
|
+
this.smresult0 = (0, bit_js_1.u32)(result0);
|
|
117
|
+
this.smresult1 = (0, bit_js_1.u32)(result1);
|
|
118
|
+
this.result0 = (0, bit_js_1.u32)(do_blend ? alpha1 : (do_clamp ? clamp0 : addresult0) | (ctrl0.forceMSB << 28));
|
|
119
|
+
this.result1 = (0, bit_js_1.u32)((do_blend ? blend1 : addresult1) | (ctrl0.forceMSB << 28));
|
|
120
|
+
this.result2 = (0, bit_js_1.u32)(addresult2);
|
|
121
|
+
ctrl0.overf0 = overf0;
|
|
122
|
+
ctrl0.overf1 = overf1;
|
|
123
|
+
ctrl0.overf = overf;
|
|
124
|
+
this.ctrl0 = ctrl0.toUint32();
|
|
125
|
+
this.ctrl1 = ctrl1.toUint32();
|
|
126
|
+
}
|
|
127
|
+
writeback() {
|
|
128
|
+
const ctrl0 = new InterpolatorConfig(this.ctrl0);
|
|
129
|
+
const ctrl1 = new InterpolatorConfig(this.ctrl1);
|
|
130
|
+
this.accum0 = (0, bit_js_1.u32)(ctrl0.crossResult ? this.result1 : this.result0);
|
|
131
|
+
this.accum1 = (0, bit_js_1.u32)(ctrl1.crossResult ? this.result0 : this.result1);
|
|
132
|
+
this.update();
|
|
133
|
+
}
|
|
134
|
+
setBase01(value) {
|
|
135
|
+
const N = this.index;
|
|
136
|
+
const ctrl0 = new InterpolatorConfig(this.ctrl0);
|
|
137
|
+
const ctrl1 = new InterpolatorConfig(this.ctrl1);
|
|
138
|
+
const do_blend = ctrl0.blend && N == 0;
|
|
139
|
+
const input0 = value & 0xffff;
|
|
140
|
+
const input1 = (value >>> 16) & 0xffff;
|
|
141
|
+
const sextmask0 = input0 & (1 << 15) ? -1 << 15 : 0;
|
|
142
|
+
const sextmask1 = input1 & (1 << 15) ? -1 << 15 : 0;
|
|
143
|
+
const base0 = (do_blend ? ctrl1.signed : ctrl0.signed) ? input0 | sextmask0 : input0;
|
|
144
|
+
const base1 = ctrl1.signed ? input1 | sextmask1 : input1;
|
|
145
|
+
this.base0 = (0, bit_js_1.u32)(base0);
|
|
146
|
+
this.base1 = (0, bit_js_1.u32)(base1);
|
|
147
|
+
this.update();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.Interpolator = Interpolator;
|
package/dist/cjs/irq.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export declare enum IRQ {
|
|
2
|
-
TIMER_0 = 0,
|
|
3
|
-
TIMER_1 = 1,
|
|
4
|
-
TIMER_2 = 2,
|
|
5
|
-
TIMER_3 = 3,
|
|
6
|
-
PWM_WRAP = 4,
|
|
7
|
-
USBCTRL = 5,
|
|
8
|
-
XIP = 6,
|
|
9
|
-
PIO0_IRQ0 = 7,
|
|
10
|
-
PIO0_IRQ1 = 8,
|
|
11
|
-
PIO1_IRQ0 = 9,
|
|
12
|
-
PIO1_IRQ1 = 10,
|
|
13
|
-
DMA_IRQ0 = 11,
|
|
14
|
-
DMA_IRQ1 = 12,
|
|
15
|
-
IO_BANK0 = 13,
|
|
16
|
-
IO_QSPI = 14,
|
|
17
|
-
SIO_PROC0 = 15,
|
|
18
|
-
SIO_PROC1 = 16,
|
|
19
|
-
CLOCKS = 17,
|
|
20
|
-
SPI0 = 18,
|
|
21
|
-
SPI1 = 19,
|
|
22
|
-
UART0 = 20,
|
|
23
|
-
UART1 = 21,
|
|
24
|
-
ADC_FIFO = 22,
|
|
25
|
-
I2C0 = 23,
|
|
26
|
-
I2C1 = 24,
|
|
27
|
-
RTC = 25
|
|
28
|
-
}
|
|
29
|
-
export declare const MAX_HARDWARE_IRQ = IRQ.RTC;
|
|
1
|
+
export declare enum IRQ {
|
|
2
|
+
TIMER_0 = 0,
|
|
3
|
+
TIMER_1 = 1,
|
|
4
|
+
TIMER_2 = 2,
|
|
5
|
+
TIMER_3 = 3,
|
|
6
|
+
PWM_WRAP = 4,
|
|
7
|
+
USBCTRL = 5,
|
|
8
|
+
XIP = 6,
|
|
9
|
+
PIO0_IRQ0 = 7,
|
|
10
|
+
PIO0_IRQ1 = 8,
|
|
11
|
+
PIO1_IRQ0 = 9,
|
|
12
|
+
PIO1_IRQ1 = 10,
|
|
13
|
+
DMA_IRQ0 = 11,
|
|
14
|
+
DMA_IRQ1 = 12,
|
|
15
|
+
IO_BANK0 = 13,
|
|
16
|
+
IO_QSPI = 14,
|
|
17
|
+
SIO_PROC0 = 15,
|
|
18
|
+
SIO_PROC1 = 16,
|
|
19
|
+
CLOCKS = 17,
|
|
20
|
+
SPI0 = 18,
|
|
21
|
+
SPI1 = 19,
|
|
22
|
+
UART0 = 20,
|
|
23
|
+
UART1 = 21,
|
|
24
|
+
ADC_FIFO = 22,
|
|
25
|
+
I2C0 = 23,
|
|
26
|
+
I2C1 = 24,
|
|
27
|
+
RTC = 25
|
|
28
|
+
}
|
|
29
|
+
export declare const MAX_HARDWARE_IRQ = IRQ.RTC;
|
package/dist/cjs/irq.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_HARDWARE_IRQ = exports.IRQ = void 0;
|
|
4
|
-
var IRQ;
|
|
5
|
-
(function (IRQ) {
|
|
6
|
-
IRQ[IRQ["TIMER_0"] = 0] = "TIMER_0";
|
|
7
|
-
IRQ[IRQ["TIMER_1"] = 1] = "TIMER_1";
|
|
8
|
-
IRQ[IRQ["TIMER_2"] = 2] = "TIMER_2";
|
|
9
|
-
IRQ[IRQ["TIMER_3"] = 3] = "TIMER_3";
|
|
10
|
-
IRQ[IRQ["PWM_WRAP"] = 4] = "PWM_WRAP";
|
|
11
|
-
IRQ[IRQ["USBCTRL"] = 5] = "USBCTRL";
|
|
12
|
-
IRQ[IRQ["XIP"] = 6] = "XIP";
|
|
13
|
-
IRQ[IRQ["PIO0_IRQ0"] = 7] = "PIO0_IRQ0";
|
|
14
|
-
IRQ[IRQ["PIO0_IRQ1"] = 8] = "PIO0_IRQ1";
|
|
15
|
-
IRQ[IRQ["PIO1_IRQ0"] = 9] = "PIO1_IRQ0";
|
|
16
|
-
IRQ[IRQ["PIO1_IRQ1"] = 10] = "PIO1_IRQ1";
|
|
17
|
-
IRQ[IRQ["DMA_IRQ0"] = 11] = "DMA_IRQ0";
|
|
18
|
-
IRQ[IRQ["DMA_IRQ1"] = 12] = "DMA_IRQ1";
|
|
19
|
-
IRQ[IRQ["IO_BANK0"] = 13] = "IO_BANK0";
|
|
20
|
-
IRQ[IRQ["IO_QSPI"] = 14] = "IO_QSPI";
|
|
21
|
-
IRQ[IRQ["SIO_PROC0"] = 15] = "SIO_PROC0";
|
|
22
|
-
IRQ[IRQ["SIO_PROC1"] = 16] = "SIO_PROC1";
|
|
23
|
-
IRQ[IRQ["CLOCKS"] = 17] = "CLOCKS";
|
|
24
|
-
IRQ[IRQ["SPI0"] = 18] = "SPI0";
|
|
25
|
-
IRQ[IRQ["SPI1"] = 19] = "SPI1";
|
|
26
|
-
IRQ[IRQ["UART0"] = 20] = "UART0";
|
|
27
|
-
IRQ[IRQ["UART1"] = 21] = "UART1";
|
|
28
|
-
IRQ[IRQ["ADC_FIFO"] = 22] = "ADC_FIFO";
|
|
29
|
-
IRQ[IRQ["I2C0"] = 23] = "I2C0";
|
|
30
|
-
IRQ[IRQ["I2C1"] = 24] = "I2C1";
|
|
31
|
-
IRQ[IRQ["RTC"] = 25] = "RTC";
|
|
32
|
-
})(IRQ
|
|
33
|
-
exports.MAX_HARDWARE_IRQ = IRQ.RTC;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_HARDWARE_IRQ = exports.IRQ = void 0;
|
|
4
|
+
var IRQ;
|
|
5
|
+
(function (IRQ) {
|
|
6
|
+
IRQ[IRQ["TIMER_0"] = 0] = "TIMER_0";
|
|
7
|
+
IRQ[IRQ["TIMER_1"] = 1] = "TIMER_1";
|
|
8
|
+
IRQ[IRQ["TIMER_2"] = 2] = "TIMER_2";
|
|
9
|
+
IRQ[IRQ["TIMER_3"] = 3] = "TIMER_3";
|
|
10
|
+
IRQ[IRQ["PWM_WRAP"] = 4] = "PWM_WRAP";
|
|
11
|
+
IRQ[IRQ["USBCTRL"] = 5] = "USBCTRL";
|
|
12
|
+
IRQ[IRQ["XIP"] = 6] = "XIP";
|
|
13
|
+
IRQ[IRQ["PIO0_IRQ0"] = 7] = "PIO0_IRQ0";
|
|
14
|
+
IRQ[IRQ["PIO0_IRQ1"] = 8] = "PIO0_IRQ1";
|
|
15
|
+
IRQ[IRQ["PIO1_IRQ0"] = 9] = "PIO1_IRQ0";
|
|
16
|
+
IRQ[IRQ["PIO1_IRQ1"] = 10] = "PIO1_IRQ1";
|
|
17
|
+
IRQ[IRQ["DMA_IRQ0"] = 11] = "DMA_IRQ0";
|
|
18
|
+
IRQ[IRQ["DMA_IRQ1"] = 12] = "DMA_IRQ1";
|
|
19
|
+
IRQ[IRQ["IO_BANK0"] = 13] = "IO_BANK0";
|
|
20
|
+
IRQ[IRQ["IO_QSPI"] = 14] = "IO_QSPI";
|
|
21
|
+
IRQ[IRQ["SIO_PROC0"] = 15] = "SIO_PROC0";
|
|
22
|
+
IRQ[IRQ["SIO_PROC1"] = 16] = "SIO_PROC1";
|
|
23
|
+
IRQ[IRQ["CLOCKS"] = 17] = "CLOCKS";
|
|
24
|
+
IRQ[IRQ["SPI0"] = 18] = "SPI0";
|
|
25
|
+
IRQ[IRQ["SPI1"] = 19] = "SPI1";
|
|
26
|
+
IRQ[IRQ["UART0"] = 20] = "UART0";
|
|
27
|
+
IRQ[IRQ["UART1"] = 21] = "UART1";
|
|
28
|
+
IRQ[IRQ["ADC_FIFO"] = 22] = "ADC_FIFO";
|
|
29
|
+
IRQ[IRQ["I2C0"] = 23] = "I2C0";
|
|
30
|
+
IRQ[IRQ["I2C1"] = 24] = "I2C1";
|
|
31
|
+
IRQ[IRQ["RTC"] = 25] = "RTC";
|
|
32
|
+
})(IRQ || (exports.IRQ = IRQ = {}));
|
|
33
|
+
exports.MAX_HARDWARE_IRQ = IRQ.RTC;
|