36 lines
734 B
C
36 lines
734 B
C
/*
|
|
* Author: username
|
|
* Date: 2024
|
|
* filename: Enable.c
|
|
* description: module_purpose
|
|
*/
|
|
|
|
#ifndef __AVR_ATtiny404__
|
|
#define __AVR_ATtiny404__
|
|
#endif
|
|
|
|
#include "Enable.h"
|
|
#include "avr/io.h"
|
|
#include "RegEdit.h"
|
|
|
|
|
|
void Enable_SetPinsHigh()
|
|
{
|
|
RegEdit_SetBit((void *) &PORTA.DIR, EN1);
|
|
RegEdit_SetBit((void *) &PORTB.DIR, EN2);
|
|
RegEdit_SetBit((void *) &PORTB.DIR, EN3);
|
|
|
|
RegEdit_SetBit((void *) &PORTA.OUT, EN1);
|
|
RegEdit_SetBit((void *) &PORTB.OUT, EN2);
|
|
RegEdit_SetBit((void *) &PORTB.OUT, EN3);
|
|
return;
|
|
}
|
|
|
|
|
|
void Enable_SetPinsLow()
|
|
{
|
|
RegEdit_ClearBit((void *) &PORTA.OUT, EN1);
|
|
RegEdit_ClearBit((void *) &PORTB.OUT, EN2);
|
|
RegEdit_ClearBit((void *) &PORTB.OUT, EN3);
|
|
return;
|
|
}
|