Fix some typos
This commit is contained in:
parent
d0703f83db
commit
0584312ef0
@ -49,7 +49,7 @@ cd examples/nrf52840
|
|||||||
cargo run --bin blinky --release
|
cargo run --bin blinky --release
|
||||||
----
|
----
|
||||||
|
|
||||||
== Whats next?
|
== What's next?
|
||||||
|
|
||||||
Congratulations, you have your first Embassy application running! Here are some alternatives on where to go from here:
|
Congratulations, you have your first Embassy application running! Here are some alternatives on where to go from here:
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ impl<'a> Writer<'a> {
|
|||||||
|
|
||||||
/// Push one data byte.
|
/// Push one data byte.
|
||||||
///
|
///
|
||||||
/// Returns true if pushed succesfully.
|
/// Returns true if pushed successfully.
|
||||||
pub fn push_one(&mut self, val: u8) -> bool {
|
pub fn push_one(&mut self, val: u8) -> bool {
|
||||||
let n = self.push(|f| match f {
|
let n = self.push(|f| match f {
|
||||||
[] => 0,
|
[] => 0,
|
||||||
@ -265,7 +265,7 @@ impl<'a> Reader<'a> {
|
|||||||
|
|
||||||
/// Pop one data byte.
|
/// Pop one data byte.
|
||||||
///
|
///
|
||||||
/// Returns true if popped succesfully.
|
/// Returns true if popped successfully.
|
||||||
pub fn pop_one(&mut self) -> Option<u8> {
|
pub fn pop_one(&mut self) -> Option<u8> {
|
||||||
let mut res = None;
|
let mut res = None;
|
||||||
self.pop(|f| match f {
|
self.pop(|f| match f {
|
||||||
|
@ -24,7 +24,7 @@ pub const FLASH_SIZE: usize = crate::chip::FLASH_SIZE;
|
|||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// Opration using a location not in flash.
|
/// Operation using a location not in flash.
|
||||||
OutOfBounds,
|
OutOfBounds,
|
||||||
/// Unaligned operation or using unaligned buffers.
|
/// Unaligned operation or using unaligned buffers.
|
||||||
Unaligned,
|
Unaligned,
|
||||||
|
@ -336,7 +336,7 @@ impl<'d, T: Instance> Twim<'d, T> {
|
|||||||
return Poll::Ready(());
|
return Poll::Ready(());
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
|
@ -320,7 +320,7 @@ impl<'d, T: Instance> Twis<'d, T> {
|
|||||||
fn blocking_listen_wait_end(&mut self, status: Status) -> Result<Command, Error> {
|
fn blocking_listen_wait_end(&mut self, status: Status) -> Result<Command, Error> {
|
||||||
let r = T::regs();
|
let r = T::regs();
|
||||||
loop {
|
loop {
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
@ -346,7 +346,7 @@ impl<'d, T: Instance> Twis<'d, T> {
|
|||||||
fn blocking_wait(&mut self) -> Result<usize, Error> {
|
fn blocking_wait(&mut self) -> Result<usize, Error> {
|
||||||
let r = T::regs();
|
let r = T::regs();
|
||||||
loop {
|
loop {
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
@ -372,7 +372,7 @@ impl<'d, T: Instance> Twis<'d, T> {
|
|||||||
let r = T::regs();
|
let r = T::regs();
|
||||||
let deadline = Instant::now() + timeout;
|
let deadline = Instant::now() + timeout;
|
||||||
loop {
|
loop {
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
@ -432,7 +432,7 @@ impl<'d, T: Instance> Twis<'d, T> {
|
|||||||
let r = T::regs();
|
let r = T::regs();
|
||||||
let deadline = Instant::now() + timeout;
|
let deadline = Instant::now() + timeout;
|
||||||
loop {
|
loop {
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
@ -465,7 +465,7 @@ impl<'d, T: Instance> Twis<'d, T> {
|
|||||||
|
|
||||||
s.waker.register(cx.waker());
|
s.waker.register(cx.waker());
|
||||||
|
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
@ -495,7 +495,7 @@ impl<'d, T: Instance> Twis<'d, T> {
|
|||||||
|
|
||||||
s.waker.register(cx.waker());
|
s.waker.register(cx.waker());
|
||||||
|
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
@ -522,7 +522,7 @@ impl<'d, T: Instance> Twis<'d, T> {
|
|||||||
|
|
||||||
s.waker.register(cx.waker());
|
s.waker.register(cx.waker());
|
||||||
|
|
||||||
// stop if an error occured
|
// stop if an error occurred
|
||||||
if r.events_error.read().bits() != 0 {
|
if r.events_error.read().bits() != 0 {
|
||||||
r.events_error.reset();
|
r.events_error.reset();
|
||||||
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
r.tasks_stop.write(|w| unsafe { w.bits(1) });
|
||||||
|
@ -25,7 +25,7 @@ pub const ERASE_SIZE: usize = 4096;
|
|||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// Opration using a location not in flash.
|
/// Operation using a location not in flash.
|
||||||
OutOfBounds,
|
OutOfBounds,
|
||||||
/// Unaligned operation or using unaligned buffers.
|
/// Unaligned operation or using unaligned buffers.
|
||||||
Unaligned,
|
Unaligned,
|
||||||
|
@ -551,7 +551,7 @@ impl<'d, T: Instance + 'd, M: Mode> I2c<'d, T, M> {
|
|||||||
|
|
||||||
if abort_reason.is_err() || (send_stop && last) {
|
if abort_reason.is_err() || (send_stop && last) {
|
||||||
// If the transaction was aborted or if it completed
|
// If the transaction was aborted or if it completed
|
||||||
// successfully wait until the STOP condition has occured.
|
// successfully wait until the STOP condition has occurred.
|
||||||
|
|
||||||
while !p.ic_raw_intr_stat().read().stop_det() {}
|
while !p.ic_raw_intr_stat().read().stop_det() {}
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ pub(crate) unsafe fn on_interrupt<T: Instance>(_: *mut ()) {
|
|||||||
s.rx_waker.wake();
|
s.rx_waker.wake();
|
||||||
}
|
}
|
||||||
// Disable any further RX interrupts when the buffer becomes full or
|
// Disable any further RX interrupts when the buffer becomes full or
|
||||||
// errors have occured. this lets us buffer additional errors in the
|
// errors have occurred. This lets us buffer additional errors in the
|
||||||
// fifo without needing more error storage locations, and most applications
|
// fifo without needing more error storage locations, and most applications
|
||||||
// will want to do a full reset of their uart state anyway once an error
|
// will want to do a full reset of their uart state anyway once an error
|
||||||
// has happened.
|
// has happened.
|
||||||
|
@ -231,7 +231,7 @@ impl<'d, T: Instance> UartTx<'d, T, Async> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance, M: Mode> UartRx<'d, T, M> {
|
impl<'d, T: Instance, M: Mode> UartRx<'d, T, M> {
|
||||||
/// Create a new DMA-enabled UART which can only recieve data
|
/// Create a new DMA-enabled UART which can only receive data
|
||||||
pub fn new(
|
pub fn new(
|
||||||
_uart: impl Peripheral<P = T> + 'd,
|
_uart: impl Peripheral<P = T> + 'd,
|
||||||
rx: impl Peripheral<P = impl RxPin<T>> + 'd,
|
rx: impl Peripheral<P = impl RxPin<T>> + 'd,
|
||||||
@ -690,7 +690,7 @@ impl<'d, T: Instance, M: Mode> Uart<'d, T, M> {
|
|||||||
self.tx.send_break(bits).await
|
self.tx.send_break(bits).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Split the Uart into a transmitter and receiver, which is particuarly
|
/// Split the Uart into a transmitter and receiver, which is particularly
|
||||||
/// useful when having two tasks correlating to transmitting and receiving.
|
/// useful when having two tasks correlating to transmitting and receiving.
|
||||||
pub fn split(self) -> (UartTx<'d, T, M>, UartRx<'d, T, M>) {
|
pub fn split(self) -> (UartTx<'d, T, M>, UartRx<'d, T, M>) {
|
||||||
(self.tx, self.rx)
|
(self.tx, self.rx)
|
||||||
|
@ -250,7 +250,7 @@ impl RtcDriver {
|
|||||||
// Call after clearing alarm, so the callback can set another alarm.
|
// Call after clearing alarm, so the callback can set another alarm.
|
||||||
|
|
||||||
// safety:
|
// safety:
|
||||||
// - we can ignore the possiblity of `f` being unset (null) because of the safety contract of `allocate_alarm`.
|
// - we can ignore the possibility of `f` being unset (null) because of the safety contract of `allocate_alarm`.
|
||||||
// - other than that we only store valid function pointers into alarm.callback
|
// - other than that we only store valid function pointers into alarm.callback
|
||||||
let f: fn(*mut ()) = unsafe { mem::transmute(alarm.callback.get()) };
|
let f: fn(*mut ()) = unsafe { mem::transmute(alarm.callback.get()) };
|
||||||
f(alarm.ctx.get());
|
f(alarm.ctx.get());
|
||||||
|
@ -112,7 +112,7 @@ pub struct UartRx<'d, T: BasicInstance, RxDma = NoDma> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance, TxDma> UartTx<'d, T, TxDma> {
|
impl<'d, T: BasicInstance, TxDma> UartTx<'d, T, TxDma> {
|
||||||
/// usefull if you only want Uart Tx. It saves 1 pin and consumes a little less power
|
/// Useful if you only want Uart Tx. It saves 1 pin and consumes a little less power.
|
||||||
pub fn new(
|
pub fn new(
|
||||||
peri: impl Peripheral<P = T> + 'd,
|
peri: impl Peripheral<P = T> + 'd,
|
||||||
tx: impl Peripheral<P = impl TxPin<T>> + 'd,
|
tx: impl Peripheral<P = impl TxPin<T>> + 'd,
|
||||||
@ -210,7 +210,7 @@ impl<'d, T: BasicInstance, TxDma> UartTx<'d, T, TxDma> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance, RxDma> UartRx<'d, T, RxDma> {
|
impl<'d, T: BasicInstance, RxDma> UartRx<'d, T, RxDma> {
|
||||||
/// usefull if you only want Uart Rx. It saves 1 pin and consumes a little less power
|
/// Useful if you only want Uart Rx. It saves 1 pin and consumes a little less power.
|
||||||
pub fn new(
|
pub fn new(
|
||||||
peri: impl Peripheral<P = T> + 'd,
|
peri: impl Peripheral<P = T> + 'd,
|
||||||
irq: impl Peripheral<P = T::Interrupt> + 'd,
|
irq: impl Peripheral<P = T::Interrupt> + 'd,
|
||||||
@ -757,7 +757,7 @@ impl<'d, T: BasicInstance, TxDma, RxDma> Uart<'d, T, TxDma, RxDma> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Split the Uart into a transmitter and receiver, which is
|
/// Split the Uart into a transmitter and receiver, which is
|
||||||
/// particuarly useful when having two tasks correlating to
|
/// particularly useful when having two tasks correlating to
|
||||||
/// transmitting and receiving.
|
/// transmitting and receiving.
|
||||||
pub fn split(self) -> (UartTx<'d, T, TxDma>, UartRx<'d, T, RxDma>) {
|
pub fn split(self) -> (UartTx<'d, T, TxDma>, UartRx<'d, T, RxDma>) {
|
||||||
(self.tx, self.rx)
|
(self.tx, self.rx)
|
||||||
|
@ -97,7 +97,7 @@ impl EndpointAddress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Infomation for an endpoint.
|
/// Information for an endpoint.
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub struct EndpointInfo {
|
pub struct EndpointInfo {
|
||||||
|
@ -370,7 +370,7 @@ pub struct Sender<'d, D: Driver<'d>> {
|
|||||||
impl<'d, D: Driver<'d>> Sender<'d, D> {
|
impl<'d, D: Driver<'d>> Sender<'d, D> {
|
||||||
/// Write a packet.
|
/// Write a packet.
|
||||||
///
|
///
|
||||||
/// This waits until the packet is succesfully stored in the CDC-NCM endpoint buffers.
|
/// This waits until the packet is successfully stored in the CDC-NCM endpoint buffers.
|
||||||
pub async fn write_packet(&mut self, data: &[u8]) -> Result<(), EndpointError> {
|
pub async fn write_packet(&mut self, data: &[u8]) -> Result<(), EndpointError> {
|
||||||
let seq = self.seq;
|
let seq = self.seq;
|
||||||
self.seq = self.seq.wrapping_add(1);
|
self.seq = self.seq.wrapping_add(1);
|
||||||
@ -436,7 +436,7 @@ pub struct Receiver<'d, D: Driver<'d>> {
|
|||||||
impl<'d, D: Driver<'d>> Receiver<'d, D> {
|
impl<'d, D: Driver<'d>> Receiver<'d, D> {
|
||||||
/// Write a network packet.
|
/// Write a network packet.
|
||||||
///
|
///
|
||||||
/// This waits until a packet is succesfully received from the endpoint buffers.
|
/// This waits until a packet is successfully received from the endpoint buffers.
|
||||||
pub async fn read_packet(&mut self, buf: &mut [u8]) -> Result<usize, EndpointError> {
|
pub async fn read_packet(&mut self, buf: &mut [u8]) -> Result<usize, EndpointError> {
|
||||||
// Retry loop
|
// Retry loop
|
||||||
loop {
|
loop {
|
||||||
|
@ -165,7 +165,7 @@ impl<'d, D: Driver<'d>, const READ_N: usize, const WRITE_N: usize> HidReaderWrit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Splits into seperate readers/writers for input and output reports.
|
/// Splits into separate readers/writers for input and output reports.
|
||||||
pub fn split(self) -> (HidReader<'d, D, READ_N>, HidWriter<'d, D, WRITE_N>) {
|
pub fn split(self) -> (HidReader<'d, D, READ_N>, HidWriter<'d, D, WRITE_N>) {
|
||||||
(self.reader, self.writer)
|
(self.reader, self.writer)
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ impl<'d> MsOsDescriptorWriter<'d> {
|
|||||||
capability_type::PLATFORM,
|
capability_type::PLATFORM,
|
||||||
&[
|
&[
|
||||||
0, // reserved
|
0, // reserved
|
||||||
// platform capability UUID, Microsoft OS 2.0 platform compabitility
|
// platform capability UUID, Microsoft OS 2.0 platform compatibility
|
||||||
0xdf,
|
0xdf,
|
||||||
0x60,
|
0x60,
|
||||||
0xdd,
|
0xdd,
|
||||||
|
@ -74,9 +74,9 @@ async fn fast_logger(mut messages: Subscriber<'static, ThreadModeRawMutex, Messa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A logger task that awaits the messages, but also does some other work.
|
/// A logger task that awaits the messages, but also does some other work.
|
||||||
/// Because of this, depeding on how the messages were published, the subscriber might miss some messages
|
/// Because of this, depending on how the messages were published, the subscriber might miss some messages.
|
||||||
///
|
///
|
||||||
/// This takes the dynamic `DynSubscriber`. This is not as performant as the generic version, but let's you ignore some of the generics
|
/// This takes the dynamic `DynSubscriber`. This is not as performant as the generic version, but let's you ignore some of the generics.
|
||||||
#[embassy_executor::task]
|
#[embassy_executor::task]
|
||||||
async fn slow_logger(mut messages: DynSubscriber<'static, Message>) {
|
async fn slow_logger(mut messages: DynSubscriber<'static, Message>) {
|
||||||
loop {
|
loop {
|
||||||
|
@ -40,7 +40,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.max_power = 100;
|
config.max_power = 100;
|
||||||
config.max_packet_size_0 = 64;
|
config.max_packet_size_0 = 64;
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -66,7 +66,7 @@ async fn main(spawner: Spawner) {
|
|||||||
config.max_power = 100;
|
config.max_power = 100;
|
||||||
config.max_packet_size_0 = 64;
|
config.max_packet_size_0 = 64;
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -45,7 +45,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.max_power = 100;
|
config.max_power = 100;
|
||||||
config.max_packet_size_0 = 64;
|
config.max_packet_size_0 = 64;
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -30,7 +30,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.max_power = 100;
|
config.max_power = 100;
|
||||||
config.max_packet_size_0 = 64;
|
config.max_packet_size_0 = 64;
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -17,8 +17,8 @@ static BLINK_MS: AtomicU32 = AtomicU32::new(0);
|
|||||||
|
|
||||||
#[embassy_executor::task]
|
#[embassy_executor::task]
|
||||||
async fn led_task(led: AnyPin) {
|
async fn led_task(led: AnyPin) {
|
||||||
// Configure the LED pin as a push pull ouput and obtain handler.
|
// Configure the LED pin as a push pull output and obtain handler.
|
||||||
// On the Nucleo F091RC theres an on-board LED connected to pin PA5.
|
// On the Nucleo F091RC there's an on-board LED connected to pin PA5.
|
||||||
let mut led = Output::new(led, Level::Low, Speed::Low);
|
let mut led = Output::new(led, Level::Low, Speed::Low);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
@ -34,7 +34,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.product = Some("USB-serial example");
|
config.product = Some("USB-serial example");
|
||||||
config.serial_number = Some("12345678");
|
config.serial_number = Some("12345678");
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -35,7 +35,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.product = Some("USB-serial example");
|
config.product = Some("USB-serial example");
|
||||||
config.serial_number = Some("12345678");
|
config.serial_number = Some("12345678");
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -57,7 +57,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.product = Some("USB-serial example");
|
config.product = Some("USB-serial example");
|
||||||
config.serial_number = Some("12345678");
|
config.serial_number = Some("12345678");
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -34,7 +34,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.product = Some("USB-serial example");
|
config.product = Some("USB-serial example");
|
||||||
config.serial_number = Some("12345678");
|
config.serial_number = Some("12345678");
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -36,7 +36,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.product = Some("USB-serial example");
|
config.product = Some("USB-serial example");
|
||||||
config.serial_number = Some("12345678");
|
config.serial_number = Some("12345678");
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -36,7 +36,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
config.product = Some("USB-serial example");
|
config.product = Some("USB-serial example");
|
||||||
config.serial_number = Some("12345678");
|
config.serial_number = Some("12345678");
|
||||||
|
|
||||||
// Required for windows compatiblity.
|
// Required for windows compatibility.
|
||||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||||
config.device_class = 0xEF;
|
config.device_class = 0xEF;
|
||||||
config.device_sub_class = 0x02;
|
config.device_sub_class = 0x02;
|
||||||
|
@ -48,7 +48,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
//Write suc.
|
//Write suc.
|
||||||
}
|
}
|
||||||
Err(..) => {
|
Err(..) => {
|
||||||
//Wasnt able to write
|
//Wasn't able to write
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user