TDC1000
This crate is a no_std driver for the TDC1000 Ultrasonic Sensing Analog Front End
Datasheet
https://www.ti.com/lit/gpn/tdc1000
About this driver
This driver allows you to configure the tdc1000 analog frontend device via spi. This driver works on an NUCLEO-L433RC when compiled in release mode.
Usage
Add this to your Cargo.toml:
[]
= "0.1.1"
And this to your main.rs
//SPI
let sck = gpioa.pa5.into_af5;
let miso = gpioa.pa6.into_af5;
let mosi = gpioa.pa7.into_af5;
let mut cs = gpioa
.pa4
.into_push_pull_output;
cs.set_high.unwrap;
//TDC 1000 enable
let mut enable_pin = gpioc
.pc8
.into_push_pull_output;
enable_pin.set_low.unwrap;
//TDC 1000 trigger
let mut trigger_pin = gpioc
.pc9
.into_push_pull_output;
trigger_pin.set_low.unwrap;
//TDC 1000 start pulse pin
let start_pin = gpioc
.pc7
.into_pull_down_input;
//TDC 1000 stop pulse pin
let stop_pin = gpioc
.pc6
.into_pull_down_input;
let mut tdc1000 = default;
tdc1000.set_tx_frequency_divider;
tdc1000.set_number_of_tx_pulses;
tdc1000.set_tx_pulse_shift_position;
tdc1000.set_time_of_flight;
tdc1000.set_short_tof_blank_period;
tdc1000.write_settings.unwrap;
loop