Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from struct import * | |
dat = None | |
with open("../OV767X_dat", "rb") as f: | |
buf = f.read() | |
dat = unpack(f'<{len(buf)//4}I',buf) | |
pin_count = 2 | |
sample_per_word, padding = divmod(32, pin_count) | |
sample_count = len(dat) * sample_per_word |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from uctypes import BF_POS, BF_LEN, BFUINT32, addressof, struct | |
# control register structure | |
DMA_CTRL_LAYOUT = { | |
"AHB_ERROR": 31<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"READ_ERROR": 30<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"WRITE_ERROR": 29<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"BUSY": 24<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"SNIFF_EN": 23<<BF_POS | 1<<BF_LEN | BFUINT32, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from uctypes import BF_POS, BF_LEN, BFUINT32, addressof, struct | |
# control register structure | |
DMA_CTRL_LAYOUT = { | |
"AHB_ERROR": 31<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"READ_ERROR": 30<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"WRITE_ERROR": 29<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"BUSY": 24<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"SNIFF_EN": 23<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"BSWAP": 22<<BF_POS | 1<<BF_LEN | BFUINT32, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rp2 import PIO, asm_pio, StateMachine | |
from time import sleep_ms, sleep, sleep_us | |
from machine import Pin, mem32 | |
from sys import byteorder | |
from uctypes import addressof, struct | |
import pio | |
import dma | |
@micropython.viper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from uctypes import * | |
from machine import Pin, PWM, mem32 | |
from sys import byteorder | |
# control register structure | |
DMA_CTRL_LAYOUT = { | |
"AHB_ERROR": 31<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"READ_ERROR": 30<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"WRITE_ERROR": 29<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"BUSY": 24<<BF_POS | 1<<BF_LEN | BFUINT32, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from uctypes import * | |
from machine import Pin, PWM, mem32 | |
# control register structure | |
DMA_CTRL_LAYOUT = { | |
"AHB_ERROR": 31<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"READ_ERROR": 30<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"WRITE_ERROR": 29<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"BUSY": 24<<BF_POS | 1<<BF_LEN | BFUINT32, | |
"SNIFF_EN": 23<<BF_POS | 1<<BF_LEN | BFUINT32, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"folders": [ | |
{ | |
"uri": "vscode-remote://wsl+debian/home/azechi/projects/pico/study" | |
} | |
], | |
"remoteAuthority": "wsl+Debian", | |
"settings": { | |
"task.allowAutomaticTasks": "on" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Env { | |
project_id: string; | |
private_key: string; | |
client_email: string; | |
private_key_id: string; | |
} | |
export default { | |
async fetch( | |
_request: Request, |
NewerOlder