Renamed module `TriacOut` --> `EnOut`

This commit is contained in:
jakeg00dwin 2024-09-14 13:05:52 -07:00
parent 4d077a2ef6
commit c73ce58b0f
5 changed files with 32 additions and 32 deletions

View File

@ -5,7 +5,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME}
RegEdit RegEdit
ADC ADC
TriacOut EnOut
zero_cross_detection zero_cross_detection
load load
Enable Enable
@ -54,5 +54,5 @@ add_subdirectory(zero_cross_detection)
add_subdirectory(ADC) add_subdirectory(ADC)
add_subdirectory(RegEdit) add_subdirectory(RegEdit)
add_subdirectory(usart) add_subdirectory(usart)
add_subdirectory(TriacOut) add_subdirectory(EnOut)
add_subdirectory(Enable) add_subdirectory(Enable)

17
src/EnOut/CMakeLists.txt Normal file
View File

@ -0,0 +1,17 @@
add_library(EnOut STATIC
EnOut.c
)
target_include_directories(EnOut PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
if(UNIT_TESTING)
target_link_libraries(EnOut
MockRegEdit
)
else()
target_link_libraries(EnOut
RegEdit
)
endif()

View File

@ -1,7 +1,7 @@
/* /*
* Author: username * Author: username
* Date: todays_date * Date: todays_date
* filename: TriacOut.c * filename: EnOut.c
* description: module_purpose * description: module_purpose
*/ */
#ifndef __AVR_ATtiny404__ #ifndef __AVR_ATtiny404__
@ -10,29 +10,29 @@
#include <avr/io.h> #include <avr/io.h>
#include "TriacOut.h" #include "EnOut.h"
#include "RegEdit.h" #include "RegEdit.h"
void TriacOut_InitTimerA(void) void EnOut_InitTimerA(void)
{ {
} }
void TriacOut_SetupPins(void) void EnOut_SetupPins(void)
{ {
RegEdit_SetBit((void *) &PORTA.DIR, G1); RegEdit_SetBit((void *) &PORTA.DIR, G1);
} }
void TriacOut_SetAllHigh(void) void EnOut_SetAllHigh(void)
{ {
RegEdit_SetBit((void *) &PORTA.OUT, G1); RegEdit_SetBit((void *) &PORTA.OUT, G1);
} }
void TriacOut_PulsePins(uint16_t pulse_time) void EnOut_PulsePins(uint16_t pulse_time)
{ {
Delay_MicroSeconds(pulse_time); Delay_MicroSeconds(pulse_time);

View File

@ -4,11 +4,11 @@
* @author username * @author username
* @date todays_date * @date todays_date
* @copyright None * @copyright None
* @file TriacOut.h * @file EnOut.h
*/ */
#ifndef TRIACOUT_H #ifndef ENOUT_H
#define TRIACOUT_H #define ENOUT_H
#include <stdint.h> #include <stdint.h>
@ -31,18 +31,18 @@ extern void (*Delay_MicroSeconds)(double us);
* This function turns off G1, G2 and G3, once the passed time in micro seconds * This function turns off G1, G2 and G3, once the passed time in micro seconds
* has elapsed the pins are all set to low. * has elapsed the pins are all set to low.
*/ */
void TriacOut_PulsePins(uint16_t pulse_time); void EnOut_PulsePins(uint16_t pulse_time);
/** /**
* This sets up the G1, G2 and the G3 pins for output. * This sets up the G1, G2 and the G3 pins for output.
*/ */
void TriacOut_SetupPins(void); void EnOut_SetupPins(void);
/** /**
* This sets G1, G2 and G3 to high on the output. * This sets G1, G2 and G3 to high on the output.
*/ */
void TriacOut_SetAllHigh(void); void EnOut_SetAllHigh(void);
#endif //TRIACOUT_H #endif //ENOUT_H

View File

@ -1,17 +0,0 @@
add_library(TriacOut STATIC
TriacOut.c
)
target_include_directories(TriacOut PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
if(UNIT_TESTING)
target_link_libraries(TriacOut
MockRegEdit
)
else()
target_link_libraries(TriacOut
RegEdit
)
endif()