Define GPCRn values in EC header

This commit is contained in:
Tim Crawford 2021-06-02 21:02:45 -06:00 committed by Jeremy Soller
parent 3fe0e2f4e4
commit b3b2a312b7
15 changed files with 12 additions and 78 deletions

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -5,12 +5,6 @@
#include <ec/gpio.h>
#define GPIO_ALT 0x00
#define GPIO_IN 0x80
#define GPIO_OUT 0x40
#define GPIO_UP 0x04
#define GPIO_DOWN 0x02
void gpio_init(void);
void gpio_debug(void);

View File

@ -8,6 +8,12 @@
#include <stdbool.h>
#include <stdint.h>
#define GPIO_ALT (0b00U << 6)
#define GPIO_IN (0b10U << 6)
#define GPIO_OUT (0b01U << 6)
#define GPIO_UP BIT(2)
#define GPIO_DOWN BIT(1)
struct Gpio {
volatile uint8_t __xdata * data;
volatile uint8_t __xdata * mirror;

View File

@ -8,6 +8,12 @@
#include <stdbool.h>
#include <stdint.h>
#define GPIO_ALT (0b00U << 6)
#define GPIO_IN (0b10U << 6)
#define GPIO_OUT (0b01U << 6)
#define GPIO_UP BIT(2)
#define GPIO_DOWN BIT(1)
struct Gpio {
volatile uint8_t __xdata * data;
volatile uint8_t __xdata * mirror;