picolibrary-microchip-megaavr0

Interactive Testing Utilities

Interactive testing utilities are available if the PICOLIBRARY_MICROCHIP_MEGAAVR0_ENABLE_INTERACTIVE_TESTING project configuration option is ON.

Table of Contents

  1. Fatal Error Trap
  2. Clock Configuration
  3. Log

Fatal Error Trap

picolibrary-microchip-megaavr0 provides an implementation for ::picolibrary::trap_fatal_error() for use in interactive tests. The implementation is defined in the source/picolibrary/testing/interactive/microchip/megaavr0/fatal_error.cc source file. The picolibrary-microchip-megaavr0 static library does not include this implementation. To use this implementation, link with the picolibrary-microchip-megaavr0-testing-interactive-fatal_error static library.

Clock Configuration

The ::picolibrary::Testing::Interactive::Microchip::megaAVR0::configure_clock() functions configure the Microchip megaAVR 0-series clock to use the internal 16/20 MHz oscillator with the desired clock prescaler settings. The ::picolibrary::Testing::Interactive::Microchip::megaAVR0::configure_clock() functions are defined in the include/picolibrary/testing/interactive/microchip/megaavr0/clock.h/source/picolibrary/testing/interactive/microchip/megaavr0/clock.cc header/source file pair.

Log

The ::picolibrary::Testing::Interactive::Microchip::megaAVR0::Log class is a reliable output stream for interacting with a Microchip megaAVR 0-series USART peripheral. The ::picolibrary::Testing::Interactive::Microchip::megaAVR0::Log class is defined in the include/picolibrary/testing/interactive/microchip/megaavr0/log.h/source/picolibrary/testing/interactive/microchip/megaavr0/log.cc header/source file pair.