diff --git a/src/TriacOut/TriacOut.c b/src/TriacOut/TriacOut.c index eae8391..46bd41f 100644 --- a/src/TriacOut/TriacOut.c +++ b/src/TriacOut/TriacOut.c @@ -8,15 +8,12 @@ #define __AVR_ATtiny404__ #endif + #include #include "TriacOut.h" #include "RegEdit.h" -void Delay_MicroSeconds_impl(double us); - -void (*Delay_MicroSeconds)(double us) = &Delay_MicroSeconds_impl; - 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, G3); } - -void Delay_MicroSeconds_impl(double us){ - return; -} diff --git a/src/main.c b/src/main.c index eab47c5..ad49417 100644 --- a/src/main.c +++ b/src/main.c @@ -12,13 +12,6 @@ //#define F_CPU 2000000UL #define F_CPU 3333333UL - -//These defines are mostly useful for when you want you editors LSP server to -//function correctly. -//#ifndef __AVR_ATtiny404__ -//#define __AVR_ATtiny404__ -//#endif - //This can prevent issues with utils/delay.h library with the gcc toolchain #define __DELAY_BACKWARD_COMPATIBLE__ @@ -36,16 +29,6 @@ //Set the function pointer for the delay func void (*Delay_MicroSeconds)(double us) = _delay_us; -//void (*Delay_MicroSeconds)(double us) = _delay_ms; - -/* -static void CLK_DisablePrescaler(void) -{ - //CCP = CCP_IOREG_gc; //Write the needed signature to CCP - ccp_write_io((void *) & (CLKCTRL.MCLKCTRLA), 0x00); //select internal 20MHz clock. - ccp_write_io((void *) & (CLKCTRL.MCLKCTRLB), 0x00); //Disable the pre-scaler. -} -*/ int main(int argc, char **argv) diff --git a/tests/TriacOut/test_TriacOut.cpp b/tests/TriacOut/test_TriacOut.cpp index a046645..4307f49 100644 --- a/tests/TriacOut/test_TriacOut.cpp +++ b/tests/TriacOut/test_TriacOut.cpp @@ -24,6 +24,9 @@ void FakeDelay(double us) //do Nothing. } +void (*Delay_MicroSeconds)(double us) = FakeDelay; + + TEST_GROUP(test_TriacOut) { void setup()