mirror of
https://github.com/hubaldv/bioz-firmware-rs.git
synced 2025-12-06 05:01:18 +00:00
Working temperature readout.
This commit is contained in:
31
src/ad5940_registers.rs
Normal file
31
src/ad5940_registers.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
use bitflags::bitflags;
|
||||
|
||||
bitflags! {
|
||||
// Address 0x00002000, Reset: 0x00080000, Name: AFECON
|
||||
pub struct ConfigurationRegister: u32 {
|
||||
const reset = 0x00080000;
|
||||
const DACBUFEN = 1 << 21;
|
||||
const DACREFEN = 1 << 20;
|
||||
const SINC2EN = 1 << 16;
|
||||
const DFTEN = 1 << 15;
|
||||
const WAVEGENEN = 1 << 14;
|
||||
const TEMPCONVEN = 1 << 13;
|
||||
const TEMPSENSEN = 1 << 12;
|
||||
const TIAEN = 1 << 11;
|
||||
const INAMPEN = 1 << 10;
|
||||
const EXBUFEN = 1 << 9;
|
||||
const ADCCONVEN = 1 << 8;
|
||||
const ADCEN = 1 << 7;
|
||||
const DACEN = 1 << 6;
|
||||
const HSREFDIS = 1 << 5;
|
||||
}
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
// Address 0x000021A8, Reset: 0x00000000, Name: ADCCON
|
||||
pub struct ADCConfigurationRegister: u32 {
|
||||
const GNPGA_1_5 = 1 << 16;
|
||||
const MUXSELN_TEMP = 0b01011 << 8;
|
||||
const MUXSELP_TEMP = 0b01011;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user