1
0
Fork 0

Use serial_uart.c instead of x68k.c now

This commit is contained in:
tmk 2013-06-21 21:48:18 +09:00
parent 42c962412b
commit f45f4193f2
6 changed files with 13 additions and 155 deletions

View file

@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <util/delay.h>
#include "print.h"
#include "util.h"
#include "x68k.h"
#include "serial.h"
#include "matrix.h"
#include "debug.h"
/*
@ -63,7 +64,7 @@ uint8_t matrix_cols(void)
void matrix_init(void)
{
x68k_init();
serial_init();
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
@ -75,13 +76,13 @@ uint8_t matrix_scan(void)
{
is_modified = false;
uint8_t code;
code = x68k_recv();
if (code == 0) {
uint16_t code;
code = serial_recv2();
if (code == -1) {
return 0;
}
phex(code); print(" ");
dprintf("%02X\n", code);
if (code&0x80) {
// break code
if (matrix_is_on(ROW(code), COL(code))) {