Beruflich Dokumente
Kultur Dokumente
* LEDRegisterWrite.c
*
* This module is used to interface the LED shift register on PortB
*
* Author: Paul Westhoff ME218A FAll 2017
*/
#include "termio.h"
#include "BITDEFS.H"
#include "ES_Port.h"
// readability defines
#define DATA BIT0HI //GPIO_PIN_0
#define DATA_HI BIT0HI
#define DATA_LO BIT0LO
if (output)
{
HWREG(GPIO_PORTB_BASE + (GPIO_O_DATA + ALL_BITS)) |= DATA_HI;
}
else
{
HWREG(GPIO_PORTB_BASE + (GPIO_O_DATA + ALL_BITS)) &= DATA_LO;
}