mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-22 06:21:00 +00:00
CPLD: Introduce Config type to clean up programming interface.
Hide the details of how the CPLD data is stored.
This commit is contained in:
@@ -28,14 +28,27 @@
|
||||
namespace portapack {
|
||||
namespace cpld {
|
||||
|
||||
struct Config {
|
||||
const std::array<uint16_t, 3328>& block_0;
|
||||
const std::array<uint16_t, 512>& block_1;
|
||||
};
|
||||
|
||||
namespace rev_20150901 {
|
||||
|
||||
extern const std::array<uint16_t, 3328> block_0;
|
||||
extern const std::array<uint16_t, 512> block_1;
|
||||
|
||||
const Config config { block_0, block_1 };
|
||||
|
||||
} /* namespace rev_20150901 */
|
||||
|
||||
namespace rev_20170522 {
|
||||
|
||||
extern const std::array<uint16_t, 3328> block_0;
|
||||
extern const std::array<uint16_t, 512> block_1;
|
||||
|
||||
const Config config { block_0, block_1 };
|
||||
|
||||
} /* namespace rev_20170522 */
|
||||
|
||||
} /* namespace cpld */
|
||||
|
Reference in New Issue
Block a user