Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Fritsche committed Jun 23, 2021
1 parent 1a2391c commit fa31ebc
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 119 deletions.
58 changes: 58 additions & 0 deletions keyboards/converter/ibmpc_usb/ibmpc_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,61 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include "ibmpc_usb.h"


const uint8_t map_cs1[MATRIX_ROWS][MATRIX_COLS] = {
{ XXX , 0x1a, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21 }, /* 00-07 */
{ 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x29, 0x33 }, /* 08-0F */
{ 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b }, /* 10-17 */
{ 0x3c, 0x3d, 0x3e, 0x3f, 0x57, 0x76, 0x4b, 0x4c }, /* 18-1F */
{ 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54 }, /* 20-27 */
{ 0x55, 0x1b, 0x5f, 0x56, 0x61, 0x62, 0x63, 0x64 }, /* 28-2F */
{ 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6c, 0x2f }, /* 30-37 */
{ 0x77, 0x78, 0x4a, 0x0d, 0x0e, 0x0f, 0x10, 0x11 }, /* 38-3F */
{ 0x12, 0x13, 0x14, 0x15, 0x16, 0x2d, 0x31, 0x44 }, /* 40-47 */
{ 0x45, 0x46, 0x30, 0x59, 0x5a, 0x5b, 0x47, 0x70 }, /* 48-4F */
{ 0x71, 0x72, 0x7d, 0x7e, 0x5e, 0x48, 0x60, 0x17 }, /* 50-57 */
{ 0x18, XXX , 0x75, 0x74, 0x5d, XXX , XXX , XXX }, /* 58-5F */
{ 0x58, 0x6d, 0x7b, 0x6f, 0x01, 0x02, 0x03, 0x04 }, /* 60-67 */
{ 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x73 }, /* 68-6F */
{ XXX , 0x2a, 0x41, XXX , 0x2b, 0x42, 0x0c, 0x2c }, /* 70-77 */
{ 0x43, XXX , 0x7a, XXX , 0x79, XXX, 0x5c, 0x2e }, /* 78-7F */
};

const uint8_t map_cs2[MATRIX_ROWS][MATRIX_COLS] = {
{ 0x48, 0x15, 0x13, 0x11, 0x0F, 0x0D, 0x0E, 0x18 }, /* 00-07 */
{ 0x01, 0x16, 0x14, 0x12, 0x10, 0x33, 0x1B, 0x79 }, /* 08-0F */
{ 0x02, 0x77, 0x5F, XXX , 0x76, 0x34, 0x1C, 0x7A }, /* 10-17 */
{ 0x03, 0x75, 0x61, 0x4c, 0x4b, 0x35, 0x1D, 0x74 }, /* 18-1F */
{ 0x04, 0x63, 0x62, 0x4d, 0x36, 0x1F, 0x1E, 0x42 }, /* 20-27 */
{ 0x05, 0x78, 0x64, 0x4e, 0x38, 0x37, 0x20, 0x2B }, /* 28-2F */
{ 0x06, 0x66, 0x65, 0x50, 0x4f, 0x39, 0x21, 0x41 }, /* 30-37 */
{ 0x07, 0x2A, 0x67, 0x51, 0x3A, 0x22, 0x23, 0x7b }, /* 38-3F */
{ 0x08, 0x68, 0x52, 0x3B, 0x3c, 0x25, 0x24, 0x6f }, /* 40-47 */
{ 0x09, 0x69, 0x6a, 0x53, 0x54, 0x3d, 0x26, 0x58 }, /* 48-4F */
{ 0x0A, XXX , 0x55, 0x6d, 0x3E, 0x27, 0x43, 0x0B }, /* 50-57 */
{ 0x4a, 0x6C, 0x57, 0x3F, 0x5d, 0x28, 0x2C, 0x0C }, /* 58-5F */
{ 0x2e, 0x60, 0x73, 0x7f, XXX , XXX , 0x29, XXX }, /* 60-67 */
{ 0x56, 0x70, XXX , 0x59, 0x44, 0x5c, XXX , XXX }, /* 68-6F */
{ 0x7d, 0x7e, 0x71, 0x5a, 0x5b, 0x45, 0x1A, 0x2d }, /* 70-77 */
{ 0x17, 0x47, 0x72, 0x30, XXX , 0x46, 0x31, 0x5e }, /* 78-7F */
};

const uint8_t map_cs3[MATRIX_ROWS][MATRIX_COLS] = {
{ XXX , 0x75, 0x5e, 0x31, XXX , XXX , 0x1a, 0x0d }, /* 00-07 */
{ 0x01, 0x74, 0x5d, XXX , 0x48, 0x33, 0x1b, 0x0e }, /* 08-0F */
{ 0x02, 0x76, 0x5f, 0x60, 0x4a, 0x34, 0x1c, 0x0f }, /* 10-17 */
{ 0x03, 0x77, 0x61, 0x4c, 0x4b, 0x35, 0x1d, 0x10 }, /* 18-1F */
{ 0x04, 0x63, 0x62, 0x4d, 0x36, 0x1f, 0x1e, 0x11 }, /* 20-27 */
{ 0x05, 0x78, 0x64, 0x4e, 0x38, 0x37, 0x20, 0x12 }, /* 28-2F */
{ 0x06, 0x66, 0x65, 0x50, 0x4f, 0x39, 0x21, 0x13 }, /* 30-37 */
{ 0x07, 0x79, 0x67, 0x51, 0x3a, 0x22, 0x23, 0x14 }, /* 38-3F */
{ 0x08, 0x68, 0x52, 0x3b, 0x3c, 0x25, 0x24, 0x15 }, /* 40-47 */
{ 0x09, 0x69, 0x6a, 0x53, 0x54, 0x3d, 0x26, 0x16 }, /* 48-4F */
{ 0x0a, XXX , 0x55, 0x28, 0x3e, 0x27, 0x17, 0x0b }, /* 50-57 */
{ 0x7a, 0x6c, 0x57, 0x3f, 0x29, XXX , 0x18, 0x0c }, /* 58-5F */
{ 0x7b, 0x6d, 0x2b, 0x58, 0x41, 0x42, 0x29, 0x2a }, /* 60-67 */
{ 0x5c, 0x70, 0x6f, 0x59, 0x44, 0x43, 0x2b, 0x2c }, /* 68-6F */
{ 0x7d, 0x7e, 0x71, 0x5a, 0x5b, 0x45, 0x2d, 0x2e }, /* 70-77 */
{ XXX , 0x73, 0x72, 0x5c, 0x47, 0x46, 0x2f, 0x30 }, /* 78-7F */
};

43 changes: 3 additions & 40 deletions keyboards/converter/ibmpc_usb/ibmpc_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,44 +77,7 @@ typedef enum { NONE, PC_XT, PC_AT, PC_TERMINAL, PC_AT_Z150 } keyboard_kind_t;

extern uint16_t keyboard_id;
extern keyboard_kind_t keyboard_kind;
/*
const uint8_t PROGMEM map_cs1[MATRIX_ROWS][MATRIX_COLS] = {
{ XXX, 0x1A, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6 }, 00-07 */
/* { KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE,KC_TAB }, 08-0F */
/* { KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I }, 10-17 */
/* { KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENTER, KC_LCTL, KC_A, KC_S, }, 18-1F */
/* { KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, 20-27 */
/* { KC_QUOTE, KC_GRAVE, KC_LSHIFT,KC_BSLASH,KC_Z, KC_X, KC_C, KC_V, }, 28-2F */
/* { KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT,KC_PAST }, 30-37 */
/* { KC_LALT, KC_SPACE, KC_CAPS, 0x0D, KC_F2, KC_F3, KC_F4, KC_F5 }, 38-3F */
/* { KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NLCK, KC_SLCK, KC_P7 }, 40-47 */
/* { KC_P8, KC_P9, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_P1 }, 48-4F */
/* { KC_P2, KC_P3, KC_P0, KC_PDOT, KC_PSCR, KC_PAUSE, KC_NUHS, KC_F11 }, 50-57 */
/* { KC_F12, KC_PEQL, KC_LGUI, KC_RGUI, KC_APP, KC_MUTE, KC_VOLD, KC_VOLU }, 58-5F */
/* { KC_UP, KC_LEFT, KC_DOWN, KC_RIGHT, KC_F13, KC_F14, KC_F15, KC_F16 }, 60-67 */
/* { KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_PENT }, 68-6F */
/* { KC_KANA, KC_INSERT,KC_DELETE,KC_RO, KC_HOME, KC_END, KC_F24, KC_PGUP }, 70-77 */
/* { KC_PGDN, KC_HENK, KC_RCTL, KC_MHEN, KC_RALT, KC_JYEN, KC_PCMM, KC_PSLS }, 78-7F */
/*};*/

/*
const uint8_t PROGMEM map_cs3[MATRIX_ROWS][MATRIX_COLS] = {
{ XXX, 0x73, 0x5C, 0x47, 0x30, 0x18, 0x19, 0x00 }, 00-07
{ 0x0C, 0x74, 0x5D, 0x48, 0x31, 0x32, 0x1A, 0x01 }, 08-0F
{ 0x0D, 0x75, 0x5E, 0x5F, 0x49, 0x33, 0x1B, 0x02 }, 10-17
{ 0x0E, 0x76, 0x60, 0x4B, 0x4A, 0x34, 0x1C, 0x03 }, 18-1F
{ 0x1F, 0x62, 0x61, 0x4C, 0x35, 0x1E, 0x1D, 0x04 }, 20-27
{ 0x10, 0x77, 0x63, 0x4D, 0x37, 0x36, 0x1F, 0x05 }, 28-2F
{ 0x11, 0x65, 0x64, 0x4F, 0x4E, 0x38, 0x20, 0x06 }, 30-37
{ 0x12, 0x78, 0x66, 0x50, 0x39, 0x21, 0x22, 0x07 }, 38-3F
{ 0x13, 0x67, 0x51, 0x3A, 0x3B, 0x24, 0x23, 0x08 }, 40-47
{ 0x14, 0x68, 0x69, 0x52, 0x53, 0x3C, 0x25, 0x09 }, 48-4F
{ 0x15, 0x6A, 0x54, 0x55, 0x3D, 0x26, 0x0A, 0x16 }, 50-57
{ 0x79, 0x6B, 0x56, 0x3E, 0x3F, 0x27, 0x0B, 0x17 }, 58-5F
{ 0x7A, 0x6C, 0x6D, 0x57, 0x40, 0x41, 0x28, 0x29 }, 60-67
{ 0x7B, 0x6F, 0x6E, 0x58, 0x43, 0x42, 0x2A, 0x2B }, 68-6F
{ 0x7C, 0x7D, 0x70, 0x59, 0x5A, 0x44, 0x2C, 0x2D }, 70-77
{ 0x7E, 0x72, 0x71, 0x5B, 0x46, 0x45, 0x2E, 0x2F }, 78-7F
};
*/
extern const uint8_t map_cs1[MATRIX_ROWS][MATRIX_COLS];
extern const uint8_t map_cs2[MATRIX_ROWS][MATRIX_COLS];
extern const uint8_t map_cs3[MATRIX_ROWS][MATRIX_COLS];
#endif
58 changes: 0 additions & 58 deletions keyboards/converter/ibmpc_usb/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,64 +424,6 @@ uint8_t matrix_get_row(uint8_t row)
return matrix[row];
}

const uint8_t map_cs1[MATRIX_ROWS][MATRIX_COLS] = {
{ XXX , 0x1a, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21 }, /* 00-07 */
{ 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x29, 0x33 }, /* 08-0F */
{ 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b }, /* 10-17 */
{ 0x3c, 0x3d, 0x3e, 0x3f, 0x57, 0x76, 0x4b, 0x4c }, /* 18-1F */
{ 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54 }, /* 20-27 */
{ 0x55, 0x1b, 0x5f, 0x56, 0x61, 0x62, 0x63, 0x64 }, /* 28-2F */
{ 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6c, 0x2f }, /* 30-37 */
{ 0x77, 0x78, 0x4a, 0x0d, 0x0e, 0x0f, 0x10, 0x11 }, /* 38-3F */
{ 0x12, 0x13, 0x14, 0x15, 0x16, 0x2d, 0x31, 0x44 }, /* 40-47 */
{ 0x45, 0x46, 0x30, 0x59, 0x5a, 0x5b, 0x47, 0x70 }, /* 48-4F */
{ 0x71, 0x72, 0x7d, 0x7e, 0x5e, 0x48, 0x60, 0x17 }, /* 50-57 */
{ 0x18, XXX , 0x75, 0x74, 0x5d, XXX , XXX , XXX }, /* 58-5F */
{ 0x58, 0x6d, 0x7b, 0x6f, 0x01, 0x02, 0x03, 0x04 }, /* 60-67 */
{ 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x73 }, /* 68-6F */
{ XXX , 0x2a, 0x41, XXX , 0x2b, 0x42, 0x0c, 0x2c }, /* 70-77 */
{ 0x43, XXX , 0x7a, XXX , 0x79, XXX, 0x5c, 0x2e }, /* 78-7F */
};

const uint8_t map_cs2[MATRIX_ROWS][MATRIX_COLS] = {
{ 0x48, 0x15, 0x13, 0x11, 0x0F, 0x0D, 0x0E, 0x18 }, /* 00-07 */
{ 0x01, 0x16, 0x14, 0x12, 0x10, 0x33, 0x1B, 0x79 }, /* 08-0F */
{ 0x02, 0x77, 0x5F, XXX , 0x76, 0x34, 0x1C, 0x7A }, /* 10-17 */
{ 0x03, 0x75, 0x61, 0x4c, 0x4b, 0x35, 0x1D, 0x74 }, /* 18-1F */
{ 0x04, 0x63, 0x62, 0x4d, 0x36, 0x1F, 0x1E, 0x42 }, /* 20-27 */
{ 0x05, 0x78, 0x64, 0x4e, 0x38, 0x37, 0x20, 0x2B }, /* 28-2F */
{ 0x06, 0x66, 0x65, 0x50, 0x4f, 0x39, 0x21, 0x41 }, /* 30-37 */
{ 0x07, 0x2A, 0x67, 0x51, 0x3A, 0x22, 0x23, 0x7b }, /* 38-3F */
{ 0x08, 0x68, 0x52, 0x3B, 0x3c, 0x25, 0x24, 0x6f }, /* 40-47 */
{ 0x09, 0x69, 0x6a, 0x53, 0x54, 0x3d, 0x26, 0x58 }, /* 48-4F */
{ 0x0A, XXX , 0x55, 0x6d, 0x3E, 0x27, 0x43, 0x0B }, /* 50-57 */
{ 0x4a, 0x6C, 0x57, 0x3F, 0x5d, 0x28, 0x2C, 0x0C }, /* 58-5F */
{ 0x2e, 0x60, 0x73, 0x7f, XXX , XXX , 0x29, XXX }, /* 60-67 */
{ 0x56, 0x70, XXX , 0x59, 0x44, 0x5c, XXX , XXX }, /* 68-6F */
{ 0x7d, 0x7e, 0x71, 0x5a, 0x5b, 0x45, 0x1A, 0x2d }, /* 70-77 */
{ 0x17, 0x47, 0x72, 0x30, XXX , 0x46, 0x31, 0x5e }, /* 78-7F */
};

const uint8_t map_cs3[MATRIX_ROWS][MATRIX_COLS] = {
{ XXX , 0x75, 0x5e, 0x31, XXX , XXX , 0x1a, 0x0d }, /* 00-07 */
{ 0x01, 0x74, 0x5d, XXX , 0x48, 0x33, 0x1b, 0x0e }, /* 08-0F */
{ 0x02, 0x76, 0x5f, 0x60, 0x4a, 0x34, 0x1c, 0x0f }, /* 10-17 */
{ 0x03, 0x77, 0x61, 0x4c, 0x4b, 0x35, 0x1d, 0x10 }, /* 18-1F */
{ 0x04, 0x63, 0x62, 0x4d, 0x36, 0x1f, 0x1e, 0x11 }, /* 20-27 */
{ 0x05, 0x78, 0x64, 0x4e, 0x38, 0x37, 0x20, 0x12 }, /* 28-2F */
{ 0x06, 0x66, 0x65, 0x50, 0x4f, 0x39, 0x21, 0x13 }, /* 30-37 */
{ 0x07, 0x79, 0x67, 0x51, 0x3a, 0x22, 0x23, 0x14 }, /* 38-3F */
{ 0x08, 0x68, 0x52, 0x3b, 0x3c, 0x25, 0x24, 0x15 }, /* 40-47 */
{ 0x09, 0x69, 0x6a, 0x53, 0x54, 0x3d, 0x26, 0x16 }, /* 48-4F */
{ 0x0a, XXX , 0x55, 0x28, 0x3e, 0x27, 0x17, 0x0b }, /* 50-57 */
{ 0x7a, 0x6c, 0x57, 0x3f, 0x29, XXX , 0x18, 0x0c }, /* 58-5F */
{ 0x7b, 0x6d, 0x2b, 0x58, 0x41, 0x42, 0x29, 0x2a }, /* 60-67 */
{ 0x5c, 0x70, 0x6f, 0x59, 0x44, 0x43, 0x2b, 0x2c }, /* 68-6F */
{ 0x7d, 0x7e, 0x71, 0x5a, 0x5b, 0x45, 0x2d, 0x2e }, /* 70-77 */
{ XXX , 0x73, 0x72, 0x5c, 0x47, 0x46, 0x2f, 0x30 }, /* 78-7F */
};


inline
static void matrix_make(uint8_t code)
{
Expand Down
20 changes: 0 additions & 20 deletions keyboards/converter/ibmpc_usb/matrix_122.txt

This file was deleted.

1 change: 0 additions & 1 deletion keyboards/converter/ibmpc_usb/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes

SRC = matrix.c ibmpc.c
#ibmpc_usb.c

0 comments on commit fa31ebc

Please sign in to comment.