xt_usb: Remove xt_io.h
This commit is contained in:
parent
1fc989947a
commit
136d55a249
3 changed files with 29 additions and 36 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2010,2011,2012,2013 Jun WAKO <wakojun@gmail.com>
|
Copyright 2018 Jun WAKO <wakojun@gmail.com>
|
||||||
Copyright 2016 Ethan Apodaca <papodaca@gmail.com>
|
Copyright 2016 Ethan Apodaca <papodaca@gmail.com>
|
||||||
|
|
||||||
This software is licensed with a Modified BSD License.
|
This software is licensed with a Modified BSD License.
|
||||||
|
|
@ -39,6 +39,32 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef XT_H
|
#ifndef XT_H
|
||||||
#define XT_H
|
#define XT_H
|
||||||
|
|
||||||
|
#define XT_DATA_IN() do { \
|
||||||
|
XT_DATA_DDR &= ~(1<<XT_DATA_BIT); \
|
||||||
|
XT_DATA_PORT |= (1<<XT_DATA_BIT); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define XT_DATA_READ() (XT_DATA_PIN&(1<<XT_DATA_BIT))
|
||||||
|
|
||||||
|
#define XT_DATA_LO() do { \
|
||||||
|
XT_DATA_PORT &= ~(1<<XT_DATA_BIT); \
|
||||||
|
XT_DATA_DDR |= (1<<XT_DATA_BIT); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
#define XT_CLOCK_IN() do { \
|
||||||
|
XT_CLOCK_DDR &= ~(1<<XT_CLOCK_BIT); \
|
||||||
|
XT_CLOCK_PORT |= (1<<XT_CLOCK_BIT); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define XT_CLOCK_READ() (XT_CLOCK_PIN&(1<<XT_CLOCK_BIT))
|
||||||
|
|
||||||
|
#define XT_CLOCK_LO() do { \
|
||||||
|
XT_CLOCK_PORT &= ~(1<<XT_CLOCK_BIT); \
|
||||||
|
XT_CLOCK_DDR |= (1<<XT_CLOCK_BIT); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
void xt_host_init(void);
|
void xt_host_init(void);
|
||||||
uint8_t xt_host_recv(void);
|
uint8_t xt_host_recv(void);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2010,2011,2012,2013 Jun WAKO <wakojun@gmail.com>
|
Copyright 2018 Jun WAKO <wakojun@gmail.com>
|
||||||
|
Copyright 2016 Ethan Apodaca <papodaca@gmail.com>
|
||||||
|
|
||||||
This software is licensed with a Modified BSD License.
|
This software is licensed with a Modified BSD License.
|
||||||
All of this is supposed to be Free Software, Open Source, DFSG-free,
|
All of this is supposed to be Free Software, Open Source, DFSG-free,
|
||||||
|
|
@ -35,16 +36,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* PS/2 protocol Pin interrupt version
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
#include "pbuff.h"
|
#include "pbuff.h"
|
||||||
#include "xt.h"
|
#include "xt.h"
|
||||||
#include "xt_io.h"
|
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
#ifndef XT_IO_H
|
|
||||||
#define XT_IO_H
|
|
||||||
|
|
||||||
#define XT_DATA_IN() do { \
|
|
||||||
XT_DATA_DDR &= ~(1<<XT_DATA_BIT); \
|
|
||||||
XT_DATA_PORT |= (1<<XT_DATA_BIT); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define XT_DATA_READ() (XT_DATA_PIN&(1<<XT_DATA_BIT))
|
|
||||||
|
|
||||||
#define XT_DATA_LO() do { \
|
|
||||||
XT_DATA_PORT &= ~(1<<XT_DATA_BIT); \
|
|
||||||
XT_DATA_DDR |= (1<<XT_DATA_BIT); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
|
|
||||||
#define XT_CLOCK_IN() do { \
|
|
||||||
XT_CLOCK_DDR &= ~(1<<XT_CLOCK_BIT); \
|
|
||||||
XT_CLOCK_PORT |= (1<<XT_CLOCK_BIT); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define XT_CLOCK_READ() (XT_CLOCK_PIN&(1<<XT_CLOCK_BIT))
|
|
||||||
|
|
||||||
#define XT_CLOCK_LO() do { \
|
|
||||||
XT_CLOCK_PORT &= ~(1<<XT_CLOCK_BIT); \
|
|
||||||
XT_CLOCK_DDR |= (1<<XT_CLOCK_BIT); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Loading…
Add table
Reference in a new issue