I hereby claim:
- I am chmanie on github.
- I am chmanie (https://keybase.io/chmanie) on keybase.
- I have a public key ASAFB4NQ0BDlZuAIUVEAdEGpvKTb2iOKpmzPA6SNDkUc4Ao
To claim this, I am signing this object:
#![no_std] | |
#![no_main] | |
use defmt::*; | |
use embassy_executor::Spawner; | |
use embassy_rp::{ | |
gpio::{Level, Output}, | |
spi::{self, Spi}, | |
}; | |
use {defmt_rtt as _, panic_probe as _}; |
#![no_std] | |
#![no_main] | |
/** | |
* Basic RP2040 DMA example, just copying one value in memory to another place in memory using DMA | |
*/ | |
use bsp::entry; | |
use cortex_m::singleton; | |
use defmt::*; | |
use defmt_rtt as _; |
/** | |
* Configure DMA to copy ADC FIFO round-robin values into memory | |
* | |
* The strategy is as follows: | |
* - Have a static array which is the DMA target address, holding 3 u16 values | |
* - Enable DMA with a data-size of halfword (16bits), increase the write address after each transfer and wrap at 8 bytes | |
* - Start the ADC according to datasheet section 4.9.2.5 (round robin with FIFO enabled and DREQ threshold 1) | |
* | |
* The result will be an array with 16bit values of ADC results where the first bit indicates an error if set | |
*/ |
//! # I²C Example | |
//! | |
//! This application demonstrates how to talk to I²C devices with an RP2040. | |
//! | |
//! It may need to be adapted to your particular board layout and/or pin assignment. | |
//! | |
//! See the `Cargo.toml` file for Copyright and licence details. | |
#![no_std] | |
#![no_main] |
use core::cell::RefCell; | |
use embedded_hal::blocking::spi::{Transfer, Write}; | |
use embedded_hal::digital::v2::OutputPin; | |
use heapless::Vec; | |
use seq_macro::seq; | |
/// Static device id | |
const DEVICE_ID: u16 = 0x0424; | |
/// Highest addressable register address |
lattice = require("lattice") | |
function createGridState() | |
local grid = {} | |
for i = 1, 16 do | |
grid[i] = {} | |
for j = 1, 8 do | |
grid[i][j] = 0 | |
end |
use std::convert::TryFrom; | |
use wmidi::MidiMessage; | |
fn create_midi_message(bytes: &[u8]) -> Option<MidiMessage> { | |
MidiMessage::try_from(bytes).ok() | |
} | |
fn main() { | |
let mut message_buffer: [u8; 1024] = [0; 1024]; | |
let mut stream_parser = StreamParser::new(&mut message_buffer); |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/ruby | |
t = `aconnect -i -l` | |
$devices = {} | |
$device = 0 | |
t.lines.each do |l| | |
match = /client (\d*)\:((?:(?!client).)*)?/.match(l) | |
# we skip empty lines and the "Through" port | |
unless match.nil? || match[1] == '0' || /Through/=~l | |
$device = match[1] |
cd mutable-dev-environment
vagrant up
vagrant ssh
cd /vagrant
git clone https://github.com/forestcaver/parasites.git --recursive
# Mind the --recursive!!! It will fail at the last step but we'll fix itcd parasites
git clone https://github.com/mqtthiqs/stmlib.git
cd stmlib && git checkout 8ab2aae