LCOV - code coverage report
Current view: top level - src - Hal.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 10 26 38.5 %
Date: 2026-11-08 19:43:08 Functions: 1 9 11.1 %

          Line data    Source code
       1             : #include "Hal.h"
       2             : 
       3             : static RadioLibHal* rlb_timestamp_hal = nullptr;
       4             : 
       5           7 : RadioLibHal::RadioLibHal(const uint32_t input, const uint32_t output, const uint32_t low, const uint32_t high, const uint32_t rising, const uint32_t falling)
       6           7 :     : GpioModeInput(input),
       7           7 :       GpioModeOutput(output),
       8           7 :       GpioLevelLow(low),
       9           7 :       GpioLevelHigh(high),
      10           7 :       GpioInterruptRising(rising),
      11           7 :       GpioInterruptFalling(falling) {
      12           7 :         if(!rlb_timestamp_hal) {
      13           1 :           rlb_timestamp_hal = this;
      14             :         }
      15           7 :       }
      16             : 
      17           0 : int16_t RadioLibHal::init() {
      18             :   // the default implementation has no failure mode
      19           0 :   return(RADIOLIB_ERR_NONE);
      20             : }
      21             : 
      22           0 : int16_t RadioLibHal::term() {
      23             :   // the default implementation has no failure mode
      24           0 :   return(RADIOLIB_ERR_NONE);
      25             : }
      26             : 
      27           0 : void RadioLibHal::tone(uint32_t pin, unsigned int frequency, RadioLibTime_t duration) {
      28             :   (void)pin;
      29             :   (void)frequency;
      30             :   (void)duration;
      31           0 : }
      32             : 
      33           0 : void RadioLibHal::noTone(uint32_t pin) {
      34             :   (void)pin;
      35           0 : }
      36             : 
      37           0 : void RadioLibHal::yield() {
      38             : 
      39           0 : }
      40             : 
      41           0 : uint32_t RadioLibHal::pinToInterrupt(uint32_t pin) {
      42           0 :   return(pin);
      43             : }
      44             : 
      45           0 : void RadioLibHal::pullUpDown(uint32_t pin, bool enable, bool up) {
      46             :   // the default implementation does nothing
      47             :   (void)pin;
      48             :   (void)enable;
      49             :   (void)up;
      50           0 : }
      51             : 
      52           0 : RadioLibTime_t rlb_time_us() {
      53           0 :   return(rlb_timestamp_hal == nullptr ? 0 : rlb_timestamp_hal->micros());
      54             : }

Generated by: LCOV version 1.14