Sha256: f034dd5861a8f51d9588778234106dccc6d37e2f3645c82c27fd987d8bb22736

Contents?: true

Size: 463 Bytes

Versions: 6

Compression:

Stored size: 463 Bytes

Contents


#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

6 entries across 6 versions & 1 rubygems

Version Path
ceedling-0.28.1 plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c
ceedling-0.27.0 plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c
ceedling-0.25.0 plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c
ceedling-0.24.0 plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c
ceedling-0.22.0 plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c
ceedling-0.21.0 plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c