Output Functions

While one of the purposes of the Cow Pi boards is to teach memory-mapped I/O, the CowPi library provides functions that work with the peripheral input/output devices for bootstrapping/scaffolding purposes. These functions can, of course, also be used when memory-mapped I/O is not a required part of an assignment.

Note

LEDs are handled by the CowPi library, and their functions are described here.

Display modules are handled by the CowPi_stdio Library library.


void cowpi_illuminate_right_led(void)

Illuminates the right LED, aka the external LED.

This is a portable implementation, not a memory-mapped implementation.

Assumes the external LED is in Arduino pin D12. An LED illuminates when the pin is placed high, to match the semantics of Arduino’s built-in LED.

void cowpi_illuminate_left_led(void)

Illuminates the left LED, aka the built-in LED, aka the internal LED.

This is a portable implementation, not a memory-mapped implementation.

Assumes the internal LED is in Arduino pin D13. The Arduino semantics are that an LED illuminates when the pin is placed high.

void cowpi_deluminate_right_led(void)

Deluminates the right LED, aka the external LED.

This is a portable implementation, not a memory-mapped implementation.

Assumes the external LED is in Arduino pin D12. An LED deluminates when the pin is placed low, to match the semantics of Arduino’s built-in LED.

void cowpi_deluminate_left_led(void)

Deluminates the left LED, aka the built-in LED, aka the internal LED.

This is a portable implementation, not a memory-mapped implementation.

Assumes the internal LED is in Arduino pin D13. The Arduino semantics are that an LED deluminates when the pin is placed low.

void cowpi_illuminate_internal_led(void)

Illuminates the internal LED, aka the built-in LED, aka the left LED.

This is a portable implementation, not a memory-mapped implementation.

Assumes the internal LED is in Arduino pin D13. The Arduino semantics are that an LED illuminates when the pin is placed high.

void cowpi_deluminate_internal_led(void)

Deluminates the internal LED, aka the built-in LED, aka the left LED.

This is a portable implementation, not a memory-mapped implementation.

Assumes the internal LED is in Arduino pin D13. The Arduino semantics are that an LED deluminates when the pin is placed low.