binary Clock
Macros
ports.h File Reference

Defines what pins are connected to and defines useful macros for setting certain pins. More...

#include <avr/io.h>

Go to the source code of this file.

Macros

#define IND_LED0   PA0
 PORT A PIN DEFINITIONS. More...
 
#define RTC_SQW   PA1
 
#define HOUR_TEN_ANO   PB0
 PORT B PIN DEFINITIONS. More...
 
#define HOUR_ONE_ANO   PB1
 
#define MIN_TEN_ANO   PB2
 
#define MIN_ONE_ANO   PB3
 
#define SEC_TEN_ANO   PB4
 
#define RTC_SDA   PB5
 
#define SEC_ONE_ANO   PB6
 
#define RTC_SCL   PB7
 
#define UART_RXD   PD0
 PORT D PIN DEFINITIONS. More...
 
#define UART_TXD   PD1
 
#define IND_LED1   PD2
 
#define LEDDRV_SDI   PD3
 
#define LEDDRV_CLK   PD4
 
#define LEDDRV_OE   PD5
 
#define LEDDRV_LE   PD6
 
#define ANO_PORT   PORTB
 The annode of the LEDs is on port B. More...
 
#define LEDDRV_OE_SET(val)   (val ? PORTD |= (1 << LEDDRV_OE) : (PORTD &= ~(1 << LEDDRV_OE)))
 Macro to set the LED Driver output enable pin to either high or low. More...
 
#define LEDDRV_LE_SET(val)   (val ? PORTD |= (1 << LEDDRV_LE) : (PORTD &= ~(1 << LEDDRV_LE)))
 Macro to set the LED Driver latch enable pin to either high or low. More...
 
#define LEDDRV_SDI_SET(val)   (val ? PORTD |= (1 << LEDDRV_SDI) : (PORTD &= ~(1 << LEDDRV_SDI)))
 Macro to set the LED Driver serial data in pin to either high or low. More...
 
#define LEDDRV_CLK_SET(val)   (val ? PORTD |= (1 << LEDDRV_CLK) : (PORTD &= ~(1 << LEDDRV_CLK)))
 Macro to set the LED Driver clock pin to either high or low. More...
 
#define LED0_set(val)   (val ? (PORTA |= 1 << IND_LED0) : (PORTA &= ~(1 << IND_LED0)))
 Macro to set the debug LED 0 pin to either high or low. More...
 
#define LED1_set(val)   (val ? (PORTD |= 1 << IND_LED1) : (PORTD &= ~(1 << IND_LED1)))
 Macro to set the debug LED 1 pin to either high or low. More...
 
#define LED0_toggle()   (PORTA ^= (1 << IND_LED0))
 Macro to toggle the debug LED 0 pin. More...
 
#define LED1_toggle()   (PORTD ^= (1 << IND_LED1))
 Macro to toggle the debug LED 1 pin. More...
 

Detailed Description

Defines what pins are connected to and defines useful macros for setting certain pins.

Macro Definition Documentation

◆ ANO_PORT

#define ANO_PORT   PORTB

The annode of the LEDs is on port B.

◆ HOUR_ONE_ANO

#define HOUR_ONE_ANO   PB1

◆ HOUR_TEN_ANO

#define HOUR_TEN_ANO   PB0

PORT B PIN DEFINITIONS.

◆ IND_LED0

#define IND_LED0   PA0

PORT A PIN DEFINITIONS.

◆ IND_LED1

#define IND_LED1   PD2

◆ LED0_set

#define LED0_set (   val)    (val ? (PORTA |= 1 << IND_LED0) : (PORTA &= ~(1 << IND_LED0)))

Macro to set the debug LED 0 pin to either high or low.

◆ LED0_toggle

#define LED0_toggle ( )    (PORTA ^= (1 << IND_LED0))

Macro to toggle the debug LED 0 pin.

◆ LED1_set

#define LED1_set (   val)    (val ? (PORTD |= 1 << IND_LED1) : (PORTD &= ~(1 << IND_LED1)))

Macro to set the debug LED 1 pin to either high or low.

◆ LED1_toggle

#define LED1_toggle ( )    (PORTD ^= (1 << IND_LED1))

Macro to toggle the debug LED 1 pin.

◆ LEDDRV_CLK

#define LEDDRV_CLK   PD4

◆ LEDDRV_CLK_SET

#define LEDDRV_CLK_SET (   val)    (val ? PORTD |= (1 << LEDDRV_CLK) : (PORTD &= ~(1 << LEDDRV_CLK)))

Macro to set the LED Driver clock pin to either high or low.

◆ LEDDRV_LE

#define LEDDRV_LE   PD6

◆ LEDDRV_LE_SET

#define LEDDRV_LE_SET (   val)    (val ? PORTD |= (1 << LEDDRV_LE) : (PORTD &= ~(1 << LEDDRV_LE)))

Macro to set the LED Driver latch enable pin to either high or low.

◆ LEDDRV_OE

#define LEDDRV_OE   PD5

◆ LEDDRV_OE_SET

#define LEDDRV_OE_SET (   val)    (val ? PORTD |= (1 << LEDDRV_OE) : (PORTD &= ~(1 << LEDDRV_OE)))

Macro to set the LED Driver output enable pin to either high or low.

◆ LEDDRV_SDI

#define LEDDRV_SDI   PD3

◆ LEDDRV_SDI_SET

#define LEDDRV_SDI_SET (   val)    (val ? PORTD |= (1 << LEDDRV_SDI) : (PORTD &= ~(1 << LEDDRV_SDI)))

Macro to set the LED Driver serial data in pin to either high or low.

◆ MIN_ONE_ANO

#define MIN_ONE_ANO   PB3

◆ MIN_TEN_ANO

#define MIN_TEN_ANO   PB2

◆ RTC_SCL

#define RTC_SCL   PB7

◆ RTC_SDA

#define RTC_SDA   PB5

◆ RTC_SQW

#define RTC_SQW   PA1

◆ SEC_ONE_ANO

#define SEC_ONE_ANO   PB6

◆ SEC_TEN_ANO

#define SEC_TEN_ANO   PB4

◆ UART_RXD

#define UART_RXD   PD0

PORT D PIN DEFINITIONS.

◆ UART_TXD

#define UART_TXD   PD1