Modernize some 'int' datatypes

pull/18/head
Jesse Vincent 9 years ago
parent c6a3793798
commit a7182e2070

@ -6,15 +6,16 @@
#define EEPROM_KEYMAP_LOCATION 0 #define EEPROM_KEYMAP_LOCATION 0
int RIGHT_COLS=8; #define RIGHT_COLS 8
int RIGHT_ROWS=4; #define RIGHT_ROWS 4
int LEFT_COLS=8; #define LEFT_COLS 8
int LEFT_ROWS=4; #define LEFT_ROWS 4
int left_colpins[]= {7,6,5,4,3,2,1,0};
int left_rowpins[]= {8,9,10,11}; uint8_t left_colpins[]= {7,6,5,4,3,2,1,0};
uint8_t left_rowpins[]= {8,9,10,11};
int right_colpins[]= {0,1,2,3,4,5,6,7};
int right_rowpins[]= {8,9,10,11}; uint8_t right_colpins[]= {0,1,2,3,4,5,6,7};
uint8_t right_rowpins[]= {8,9,10,11};

@ -29,15 +29,14 @@ void setup();
#include <Wire.h> #include <Wire.h>
#include "KeyboardioSX1509.h" #include "KeyboardioSX1509.h"
//extern int usbMaxPower; //extern uint8_t usbMaxPower;
char x; char x;
char y; char y;
byte matrixState[ROWS][COLS]; uint8_t matrixState[ROWS][COLS];
static const Key keymaps[KEYMAPS][ROWS][COLS] = { KEYMAP_LIST }; static const Key keymaps[KEYMAPS][ROWS][COLS] = { KEYMAP_LIST };
long reporting_counter = 0;
byte primary_keymap = 0; byte primary_keymap = 0;
byte temporary_keymap = 0; byte temporary_keymap = 0;
@ -83,7 +82,7 @@ void send_key_events();
void send_key_event(byte row, byte col); void send_key_event(byte row, byte col);
void press_key(Key mappedKey); void press_key(Key mappedKey);
int setup_sx1509(sx1509Class sx1509, int colpins[], int rowpins[]); int setup_sx1509(sx1509Class sx1509, uint8_t colpins[], uint8_t rowpins[]);
#ifndef VERSION #ifndef VERSION
#define VERSION "locally-built" #define VERSION "locally-built"

@ -293,14 +293,14 @@ void press_key(Key mappedKey) {
Keyboard.press(mappedKey.rawKey); Keyboard.press(mappedKey.rawKey);
} }
void make_input(sx1509Class sx1509, int pin) { void make_input(sx1509Class sx1509, uint8_t pin) {
sx1509.pinDir(pin, INPUT); // Set SX1509 pin 1 as an input sx1509.pinDir(pin, INPUT); // Set SX1509 pin 1 as an input
sx1509.writePin(pin, HIGH); // Activate pull-up sx1509.writePin(pin, HIGH); // Activate pull-up
} }
void make_output(sx1509Class sx1509, int pin) { void make_output(sx1509Class sx1509, uint8_t pin) {
sx1509.pinDir(pin, OUTPUT); sx1509.pinDir(pin, OUTPUT);
sx1509.writePin(pin, HIGH); sx1509.writePin(pin, HIGH);
@ -314,7 +314,7 @@ void setup_pins() {
} }
int setup_sx1509 (sx1509Class sx1509, int colpins[], int rowpins[]) { int setup_sx1509 (sx1509Class sx1509, uint8_t colpins[], uint8_t rowpins[]) {
byte initted; byte initted;
for (int counter = 0; counter < 10; counter++) { for (int counter = 0; counter < 10; counter++) {

@ -3,8 +3,8 @@
#include "HIDTables.h" #include "HIDTables.h"
typedef struct { typedef struct {
int8_t flags; uint8_t flags;
int8_t rawKey; uint8_t rawKey;
} Key; } Key;

@ -17,7 +17,7 @@
#define LED_COUNT 64 #define LED_COUNT 64
static const int8_t key_led_map[4][16] = { static const uint8_t key_led_map[4][16] = {
{3,4,11,12,19,20,26,27, 36,37,43,44,51,52,59,60}, {3,4,11,12,19,20,26,27, 36,37,43,44,51,52,59,60},
{2,5,10,13,18,21,31,28, 35,32,42,45,50,53,58,61}, {2,5,10,13,18,21,31,28, 35,32,42,45,50,53,58,61},
{1,6,9,14, 17,22,25,29, 34,38,41,46,49,54,57,62}, {1,6,9,14, 17,22,25,29, 34,38,41,46,49,54,57,62},

Loading…
Cancel
Save