Sha256: fe984944e174f9c530965ae6067a9eebec35da678dcf1c84b181423ae66bad47
Contents?: true
Size: 798 Bytes
Versions: 2
Compression:
Stored size: 798 Bytes
Contents
/* ========================================================================= Ceedling - Test-Centered Build System for C ThrowTheSwitch.org Copyright (c) 2010-24 Mike Karlesky, Mark VanderVoord, & Greg Williams SPDX-License-Identifier: MIT ========================================================================= */ #include "hardware_abstraction.h" #include "registers.h" void driver_write(uint8_t val) { IO_MEM_WR8(DRIVER_OUTPUT_REGISTER, val); } uint8_t driver_read() { return IO_MEM_RD8(DRIVER_INPUT_REGISTER); } void driver_init_device() { uint8_t hw_version = IO_MEM_RD8(HARDWARE_VERSION_REGISTER); if(HARDWARE_REV_B == hw_version) { IO_MEM_WR8(DRIVER_PERIPHERAL_ENABLE_REG, 1); } IO_MEM_WR8(DRIVER_PERIPHERAL_INITIALIZE_REG, 1); }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ceedling-1.0.1 | plugins/fff/vendor/fff/examples/driver_testing/driver.c |
ceedling-1.0.0 | plugins/fff/vendor/fff/examples/driver_testing/driver.c |