patched the function pointer code

This commit is contained in:
jakeg00dwin 2024-07-27 12:22:34 -07:00
parent f035978610
commit 9dddf21eef
2 changed files with 5 additions and 9 deletions

View File

@ -8,15 +8,12 @@
#define __AVR_ATtiny404__ #define __AVR_ATtiny404__
#endif #endif
#include <avr/io.h> #include <avr/io.h>
#include "TriacOut.h" #include "TriacOut.h"
#include "RegEdit.h" #include "RegEdit.h"
void Delay_MicroSeconds_impl(double us);
void (*Delay_MicroSeconds)(double us) = &Delay_MicroSeconds_impl;
void TriacOut_InitTimerA(void) void TriacOut_InitTimerA(void)
{ {
@ -47,7 +44,3 @@ void TriacOut_PulsePins(uint16_t pulse_time)
RegEdit_ClearBit((void *) &PORTB.OUT, G2); RegEdit_ClearBit((void *) &PORTB.OUT, G2);
RegEdit_ClearBit((void *) &PORTB.OUT, G3); RegEdit_ClearBit((void *) &PORTB.OUT, G3);
} }
void Delay_MicroSeconds_impl(double us){
return;
}

View File

@ -24,11 +24,14 @@ void FakeDelay(double us)
//do Nothing. //do Nothing.
} }
void (*Delay_MicroSeconds)(double us) = FakeDelay;
TEST_GROUP(test_TriacOut) TEST_GROUP(test_TriacOut)
{ {
void setup() void setup()
{ {
UT_PTR_SET(Delay_MicroSeconds, FakeDelay); //UT_PTR_SET(Delay_MicroSeconds, FakeDelay);
} }
void teardown() void teardown()
{ {