Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#[idle]
fn idle(_: idle::Context) -> ! {
loop {
core::sync::atomic::spin_loop_hint();
}
}
ISO-10303-21;
HEADER;
/* R_0805_2012Metric.step 3D STEP model for use in ECAD systems
* Copyright (C) 2018, kicad StepUp
*
* This work is licensed under the [Creative Commons CC-BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/legalcode),
* with the following exception:
* To the extent that the creation of electronic designs that use 'Licensed Material' can be considered to be 'Adapted Material',
* then the copyright holder waives article 3 of the license with respect to these designs and any generated files which use data provided
* as part of the 'Licensed Material'.
function context()
ctx = probe_context()
ctx.DbgMCU_CR = 0x7
ctx.DbgMCU_APB1_Fz = 0x0
ctx.DbgMCU_APB2_Fz = 0x0
ctx.TraceClk_Pin = 0x40002
ctx.TraceD0_Pin = 0x40003
ctx.TraceD1_Pin = 0x40004
ctx.TraceD2_Pin = 0x40005
ctx.TraceD3_Pin = 0x40006
@mvirkkunen
mvirkkunen / pack.xml
Created September 3, 2020 18:26
sequence_parser
<sequence name="ResetHardware">
<block>
__var nReset = 0x80;
__var canReadPins = 0;
// De-assert nRESET line
canReadPins = (DAP_SWJ_Pins(0x00, nReset, 0) != 0xFFFFFFFF);
</block>
<!-- Keep reset active for 50 ms -->
<control while="1" timeout="50000"/>
<control if="canReadPins">
set -e
cargo build -p app --target thumbv7m-none-eabi
echo "Starting QEMU (Ctrl-A X to exit)"
qemu-system-arm \
-cpu cortex-m3 \
-machine lm3s6965evb \
-nographic \
impl<U: UsbCore> UsbClass<U> for CdcAcmClass<U> {
fn configure(&mut self, mut config: Config<U>) -> Result<()> {
const DESC: InterfaceDescriptor = InterfaceDescriptor::class(USB_CLASS_CDC)
.sub_class(CDC_SUBCLASS_ACM).protocol(CDC_PROTOCOL_NONE);
let mut assoc = config.interface_association(DESC)?;
assoc
.interface(
impl<U: UsbCore> UsbClass<U> for CdcAcmClass<U> {
fn configure(&mut self, mut config: Config<U>) -> Result<()> {
const DESC: InterfaceDescriptor = InterfaceDescriptor::class(USB_CLASS_CDC)
.sub_class(CDC_SUBCLASS_ACM).protocol(CDC_PROTOCOL_NONE);
config
.interface_association(|a| a
.interface(&mut self.comm_if, DESC, |i| i
.descriptor(
CS_INTERFACE,
use crate::Result;
use crate::allocator::InterfaceHandle;
use crate::class::{ControlIn, ControlOut, UsbClass, PollEvent};
use crate::config::Config;
use crate::descriptor::BosWriter;
use crate::usbcore::UsbCore;
macro_rules! tuple_impls {
($($n:tt: $c:ident),+) => {
impl<U, $($c),+> UsbClass<U> for ($(&mut $c),+,)
use crate::Result;
use crate::allocator::InterfaceHandle;
use crate::class::{ControlIn, ControlOut, UsbClass, PollEvent};
use crate::config::Config;
use crate::descriptor::BosWriter;
use crate::usbcore::UsbCore;
macro_rules! tuple_impls {
($($n:tt: $c:ident),+) => {
impl<U, $($c),+> UsbClass<U> for ($(&mut $c),+)
matti@miya:~$ rustc --print cfg --target thumbv7m-none-eabi
debug_assertions
target_arch="arm"
target_endian="little"
target_env=""
target_os="none"
target_pointer_width="32"
target_vendor=""
matti@miya:~$ rustc --print cfg --target thumbv6m-none-eabi
debug_assertions