forked from M-Labs/humpback-dds
cpld: add size_of
This commit is contained in:
parent
5f874e81b5
commit
990fc075f1
|
@ -6,6 +6,7 @@ use embedded_hal::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use core::cell;
|
use core::cell;
|
||||||
|
use core::mem::size_of;
|
||||||
|
|
||||||
use cortex_m;
|
use cortex_m;
|
||||||
use cortex_m::asm::nop;
|
use cortex_m::asm::nop;
|
||||||
|
@ -63,7 +64,6 @@ where
|
||||||
{
|
{
|
||||||
type Error = Error<E>;
|
type Error = Error<E>;
|
||||||
fn select_chip(&mut self, chip: u8) -> Result<(), Self::Error> {
|
fn select_chip(&mut self, chip: u8) -> Result<(), Self::Error> {
|
||||||
hprintln!("Selected chip {}.", chip);
|
|
||||||
match chip & (1 << 0) {
|
match chip & (1 << 0) {
|
||||||
0 => self.chip_select.0.set_low(),
|
0 => self.chip_select.0.set_low(),
|
||||||
_ => self.chip_select.0.set_high(),
|
_ => self.chip_select.0.set_high(),
|
||||||
|
|
Loading…
Reference in New Issue