CPLD: Introduce Config type to clean up programming interface.

Hide the details of how the CPLD data is stored.
This commit is contained in:
Jared Boone 2017-06-02 16:54:24 -07:00
parent 76c2cc77af
commit a3483a8394
4 changed files with 21 additions and 10 deletions

View file

@ -176,11 +176,11 @@ void init() {
clock_manager.run_at_full_speed();
if( portapack_model() == PortaPackModel::R2_20170522 ) {
if( !cpld_update_if_necessary(portapack::cpld::rev_20170522::block_0, portapack::cpld::rev_20170522::block_1) ) {
if( !cpld_update_if_necessary(portapack::cpld::rev_20170522::config) ) {
chSysHalt();
}
} else {
if( !cpld_update_if_necessary(portapack::cpld::rev_20150901::block_0, portapack::cpld::rev_20150901::block_1) ) {
if( !cpld_update_if_necessary(portapack::cpld::rev_20150901::config) ) {
chSysHalt();
}
}