CPLD: Organize CPLD code into namespaces.

Use type aliases to hide actual CPLD type (somewhat).
This commit is contained in:
Jared Boone 2017-06-02 21:57:13 -07:00
parent dd0c009e6f
commit dec4e41189
6 changed files with 51 additions and 22 deletions

View file

@ -182,11 +182,11 @@ void init() {
clock_manager.set_reference_ppb(persistent_memory::correction_ppb());
clock_manager.run_at_full_speed();
if( !cpld_update_if_necessary(portapack_cpld_config()) ) {
if( !portapack::cpld::update_if_necessary(portapack_cpld_config()) ) {
chSysHalt();
}
if( !cpld_hackrf_load_sram() ) {
if( !hackrf::cpld::load_sram() ) {
chSysHalt();
}
@ -217,7 +217,7 @@ void shutdown() {
radio::disable();
audio::shutdown();
cpld_hackrf_init_from_eeprom();
hackrf::cpld::init_from_eeprom();
clock_manager.shutdown();