mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 17:05:37 -04:00
Tighten up radio API, stop leaking 1st/2nd IF instances.
This commit is contained in:
parent
ef86848139
commit
3e2b6087c2
4 changed files with 48 additions and 8 deletions
|
@ -22,6 +22,9 @@
|
|||
#include "radio.hpp"
|
||||
|
||||
#include "rf_path.hpp"
|
||||
|
||||
#include "rffc507x.hpp"
|
||||
#include "max2837.hpp"
|
||||
#include "max5864.hpp"
|
||||
#include "baseband_cpld.hpp"
|
||||
|
||||
|
@ -183,4 +186,28 @@ void configure(Configuration configuration) {
|
|||
set_direction(configuration.direction);
|
||||
}
|
||||
|
||||
namespace debug {
|
||||
|
||||
namespace first_if {
|
||||
|
||||
uint32_t register_read(const size_t register_number) {
|
||||
return radio::first_if.read(register_number);
|
||||
}
|
||||
|
||||
} /* namespace first_if */
|
||||
|
||||
namespace second_if {
|
||||
|
||||
uint32_t register_read(const size_t register_number) {
|
||||
return radio::second_if.read(register_number);
|
||||
}
|
||||
|
||||
uint8_t temp_sense() {
|
||||
return radio::second_if.temp_sense() & 0x1f;
|
||||
}
|
||||
|
||||
} /* namespace second_if */
|
||||
|
||||
} /* namespace debug */
|
||||
|
||||
} /* namespace radio */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue