dds: fix tab
This commit is contained in:
parent
dcf1c94dda
commit
90446bcce2
14
src/dds.rs
14
src/dds.rs
|
@ -524,7 +524,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Configure a RAM mode profile, wrt supplied amplitude data
|
* Configure a RAM mode profile, wrt supplied amplitude data
|
||||||
* This will setup the static RAM_VEC by converting amplitude to asf
|
* This will setup the static RAM_VEC by converting amplitude to asf
|
||||||
*/
|
*/
|
||||||
pub unsafe fn set_amplitude_ram_profile(&mut self, profile: u8, start_addr: u16, end_addr: u16,
|
pub unsafe fn set_amplitude_ram_profile(&mut self, profile: u8, start_addr: u16, end_addr: u16,
|
||||||
|
@ -583,13 +583,13 @@ where
|
||||||
// Convert phase data into bytes recognized by DDS
|
// Convert phase data into bytes recognized by DDS
|
||||||
for deg in phase_data.iter() {
|
for deg in phase_data.iter() {
|
||||||
let pow = self.degree_to_pow(*deg);
|
let pow = self.degree_to_pow(*deg);
|
||||||
RAM_VEC.push(((pow >> 8) & 0xFF) as u8)
|
RAM_VEC.push(((pow >> 8) & 0xFF) as u8)
|
||||||
.map_err(|_| Error::DDSRAMError)?;
|
.map_err(|_| Error::DDSRAMError)?;
|
||||||
RAM_VEC.push(((pow >> 0) & 0xFF) as u8)
|
RAM_VEC.push(((pow >> 0) & 0xFF) as u8)
|
||||||
.map_err(|_| Error::DDSRAMError)?;
|
.map_err(|_| Error::DDSRAMError)?;
|
||||||
RAM_VEC.push(0)
|
RAM_VEC.push(0)
|
||||||
.map_err(|_| Error::DDSRAMError)?;
|
.map_err(|_| Error::DDSRAMError)?;
|
||||||
RAM_VEC.push(0)
|
RAM_VEC.push(0)
|
||||||
.map_err(|_| Error::DDSRAMError)?;
|
.map_err(|_| Error::DDSRAMError)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -665,9 +665,9 @@ where
|
||||||
// Return DDS RAM Error if it does not fix into the RAM
|
// Return DDS RAM Error if it does not fix into the RAM
|
||||||
let span = upper_boundary - lower_boundary;
|
let span = upper_boundary - lower_boundary;
|
||||||
let data_size = if core::intrinsics::roundf64(span/f_resolution) == (span/f_resolution) {
|
let data_size = if core::intrinsics::roundf64(span/f_resolution) == (span/f_resolution) {
|
||||||
(span/f_resolution) as u64 + 1
|
(span/f_resolution) as u64 + 1
|
||||||
} else {
|
} else {
|
||||||
(span/f_resolution) as u64
|
(span/f_resolution) as u64
|
||||||
};
|
};
|
||||||
let ram_size = data_size * duplication;
|
let ram_size = data_size * duplication;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue