diff options
author | Erez Zukerman <bulk@ezuk.org> | 2016-03-22 21:30:25 +0200 |
---|---|---|
committer | Erez Zukerman <bulk@ezuk.org> | 2016-03-22 21:30:25 +0200 |
commit | 403d756ad56de18488e3d048e849c55e77a20b32 (patch) | |
tree | b02cd9a378a29d9b8cde07a7d97b46c24e74a3b1 /keyboard/ergodox_ez | |
parent | 7f0d77e08c6b5d75a1f912051e6d2928d66e7c3b (diff) | |
parent | baeffd99da5603cd5156bbcf0cd45ae62711858f (diff) |
Merge pull request #190 from yoyoerx/function_pointers
Addressing void* return warning & coding style
Diffstat (limited to 'keyboard/ergodox_ez')
67 files changed, 32971 insertions, 41381 deletions
diff --git a/keyboard/ergodox_ez/190hotfix.sh b/keyboard/ergodox_ez/190hotfix.sh new file mode 100755 index 0000000000..bdc3adce22 --- /dev/null +++ b/keyboard/ergodox_ez/190hotfix.sh @@ -0,0 +1,19 @@ +#!/bin/bash +#a tool to fix broken keymaps as a result of pull request #190 +#changing the declaration of matrix_scan_user() and matrix_init_user() +# +#This script will save a copy of the specified keymap as keymap.c.bak +#and then create a new keymap.c with the definion corrected. +#this script must be run from the ergodox_ez directory +if [ $# -ne 1 ]; then + echo $0: usage: ./190hotfix keymap_name + exit 1 +fi + +echo Saving backup as ./keymaps/$1/keymap.c.bak ... +mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak + +echo Modifying ./keymaps/$1/keymap.c ... +cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c + +echo Complete! diff --git a/keyboard/ergodox_ez/ergodox_ez.c b/keyboard/ergodox_ez/ergodox_ez.c index d0eaf33923..97e6de1ee3 100644 --- a/keyboard/ergodox_ez/ergodox_ez.c +++ b/keyboard/ergodox_ez/ergodox_ez.c @@ -5,16 +5,16 @@ bool i2c_initialized = 0; uint8_t mcp23018_status = 0x20; __attribute__ ((weak)) -void * matrix_init_user(void) { - return NULL; -}; +void matrix_init_user(void) { + +} __attribute__ ((weak)) -void * matrix_scan_user(void) { - return NULL; -}; +void matrix_scan_user(void) { + +} -void * matrix_init_kb(void) { +void matrix_init_kb(void) { // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") TCCR1A = 0b10101001; // set and configure fast PWM TCCR1B = 0b00001001; // set and configure fast PWM @@ -34,21 +34,12 @@ void * matrix_init_kb(void) { ergodox_blink_all_leds(); - if (matrix_init_user) { - (*matrix_init_user)(); - } - - return NULL; -}; - -void * matrix_scan_kb(void) { - - if (matrix_scan_user) { - (*matrix_scan_user)(); - } + matrix_init_user(); +} - return NULL; -}; +void matrix_scan_kb(void) { + matrix_scan_user(); +} void ergodox_blink_all_leds(void) diff --git a/keyboard/ergodox_ez/ergodox_ez.h b/keyboard/ergodox_ez/ergodox_ez.h index aceb7ed9c3..1e446baf6f 100644 --- a/keyboard/ergodox_ez/ergodox_ez.h +++ b/keyboard/ergodox_ez/ergodox_ez.h @@ -123,8 +123,8 @@ inline void ergodox_led_all_set(uint8_t n) { k0D, k1D, k2D, k3D, k4D, KC_NO } \ } -void * matrix_init_user(void); -void * matrix_scan_user(void); +void matrix_init_user(void); +void matrix_scan_user(void); diff --git a/keyboard/ergodox_ez/keymaps/andrew_osx/andrew_osx.hex b/keyboard/ergodox_ez/keymaps/andrew_osx/andrew_osx.hex index e3ee9afd3e..fc0876d844 100644 --- a/keyboard/ergodox_ez/keymaps/andrew_osx/andrew_osx.hex +++ b/keyboard/ergodox_ez/keymaps/andrew_osx/andrew_osx.hex @@ -1,17 +1,17 @@ -:100000000C9400070C9444070C9444070C94440788
-:100010000C9444070C9444070C9444070C94440734
-:100020000C9444070C9444070C9458120C942A1313
-:100030000C9444070C9444070C9444070C94440714
-:100040000C9444070C94022C0C9444070C94440721
-:100050000C9444070C94FA210C9444070C94440724
-:100060000C9444070C9444070C9444070C944407E4
-:100070000C9444070C9444070C9444070C944407D4
-:100080000C9444070C9444070C9444070C944407C4
-:100090000C9444070C9444070C9444070C944407B4
-:1000A0000C9444070C9444070C9444079713B91319
-:1000B000A714B913A714FE132114A71476148914D6
-:1000C000D017D017FF17FF17431881189B1A9B1AD8
-:1000D0009A189B1A9B199B196F1A9B1A9B1A861ABE
+:100000000C9465020C94AC020C94AC020C94AC02FF
+:100010000C94AC020C94AC020C94AC020C94AC02A8
+:100020000C94AC020C94AC020C94C30B0C94950C85
+:100030000C94AC020C94AC020C94AC020C94AC0288
+:100040000C94AC020C9409210C94AC020C94AC02FC
+:100050000C94AC020C949B1A0C94AC020C94AC0261
+:100060000C94AC020C94AC020C94AC020C94AC0258
+:100070000C94AC020C94AC020C94AC020C94AC0248
+:100080000C94AC020C94AC020C94AC020C94AC0238
+:100090000C94AC020C94AC020C94AC020C94AC0228
+:1000A0000C94AC020C94AC020C94AC02020D240D26
+:1000B000170E240D170E690D8C0D170EE10DF40DA2
+:1000C000DE10DE100D110D1150118A1197139713C8
+:1000D000A3119713981298126B1397139713821307
:1000E0000000F0A12E002B002971E10035810000F5
:1000F0001E00140004001D71E20027021F001A00F8
:1001000016001B00E104E3002000080007000600C1
@@ -43,1429 +43,1079 @@ :1002A0000100010001000100A9000100010001009E
:1002B0000100AC00AA00B600010001000100AB0083
:1002C000A80001000100010001000100010001007F
-:1002D00001000100AE000100010000000A0025300D
-:1002E000313662003A200025303258000A722F63FE
-:1002F0002030313233343536373839414243444582
-:10030000460A000A002530325800626F756E636538
-:10031000213A20006C6566742073696465206174FD
-:100320007461636865640A006C656674207369644F
-:1003300065206E6F7420726573706F6E64696E678E
-:100340000A00747279696E6720746F207265736534
-:1003500074206D637032333031380A000A444542EC
-:1003600055473A20656E61626C65642E0A005B73C6
-:100370005D004B6579626F617264207374617274A1
-:100380002E0A005B575D005B535D005B525D005BB6
-:10039000445D005B435D0016034500720067006F1B
-:1003A0000044006F007800200045005A000000164D
-:1003B000034500720067006F0044006F0078002062
-:1003C0000045005A0000000403090409028D0005DD
-:1003D0000100A0FA09040000010301010009211134
-:1003E000010001223F000705810308000A090401FA
-:1003F000000103010200092111010001224D000743
-:1004000005820308000A0904020001030000000934
-:1004100021110100012236000705830308000A09A3
-:100420000403000203000000092111010001222041
-:1004300000070584032000010705040320000109CB
-:100440000404000103000000092111010001223908
-:1004500000070585031000011201100100000008CB
-:10046000EDFE071301000102000105010906A101CB
-:10047000050719E029E71500250195087501810296
-:100480000508190129059505750191029501750366
-:100490009101050719002977150025019578750147
-:1004A0008102C00631FF0974A1010975150025FFFD
-:1004B0009520750881020976150025FF952075089D
-:1004C0009102C005010980A101850216010026B72D
-:1004D000001A01002AB700751095018100C0050CB3
-:1004E0000901A1018503160100269C021A01002AB8
-:1004F0009C02751095018100C005010902A1010946
-:1005000001A10005091901290515002501950575A9
-:100510000181029501750381010501093009311539
-:1005200081257F95027508810609381581257F95FB
-:100530000175088106050C0A38021581257F950191
-:1005400075088106C0C005010906A101050719E06B
-:1005500029E71500250195087501810295017508A7
-:10056000810105081901290595057501910295017B
-:10057000750391010507190029FF150025FF950650
-:1005800075088100C00A002530325820006B65795B
-:10059000626F6172645F7265706F72743A20000AF4
-:1005A0000025303258006B6579626F6172645F7349
-:1005B00065745F6C65643A200064656C5F6B657997
-:1005C0005F6269743A2063616E27742064656C3AD7
-:1005D00020253032580A006164645F6B65795F6280
-:1005E00069743A2063616E2774206164643A20253F
-:1005F0003032580A00646F6E652E0A00626F6F67B2
-:100600006D61676963207363616E3A202E2E2E2020
-:1006100000290A002575002F002575005D2800259A
-:10062000640020002564002000256400200025646B
-:10063000007C0025303258006D6F7573656B6579ED
-:10064000205B62746E7C782079207620685D287249
-:1006500065702F61636C293A205B006D6B5F776872
-:1006600065656C5F74696D655F746F5F6D6178203F
-:100670003D2025640A006D6B5F776865656C5F6D72
-:1006800061785F7370656564203D2025640A006DA4
-:100690006B5F74696D655F746F5F6D6178203D207D
-:1006A00025640A006D6B5F6D61785F7370656564CA
-:1006B000203D2025640A006D6B5F696E746572765B
-:1006C000616C203D2025640A006D6B5F64656C6180
-:1006D00079203D2025640A006D6B5F776865656C45
-:1006E0005F74696D655F746F5F6D6178203D202573
-:1006F000640A006D6B5F776865656C5F6D61785F3C
-:100700007370656564203D2025640A006D6B5F741D
-:10071000696D655F746F5F6D6178203D2025640AA7
-:10072000006D6B5F6D61785F7370656564203D205F
-:1007300025640A006D6B5F696E74657276616C206A
-:100740003D2025640A006D6B5F64656C6179203D16
-:100750002025640A000A00257500363A207768656E
-:10076000656C5F74696D655F746F5F6D61783A2069
-:10077000000A00257500353A20776865656C5F6D65
-:1007800061785F73706565643A20000A0025750022
-:10079000343A2074696D655F746F5F6D61783A20DB
-:1007A000000A00257500333A206D61785F7370652B
-:1007B00065643A20000A00257500323A20696E749B
-:1007C000657276616C286D73293A20000A002575E0
-:1007D00000313A2064656C6179282A31306D7329C3
-:1007E0003A20000A092D2056616C756573202D0A88
-:1007F000004D3E004D25643E20003F00736574208F
-:1008000064656661756C740A00433E200077686514
-:1008100072652064656C74613A20637572736F72DF
-:100820003D25642C20776865656C3D25640A536519
-:100830006520687474703A2F2F656E2E77696B6926
-:1008400070656469612E6F72672F77696B692F4DD0
-:100850006F7573655F6B6579730A000A092D204D0A
-:100860006F7573656B6579202D0A4553432F713A77
-:1008700009717569740A313A0964656C6179282ACD
-:1008800031306D73290A323A09696E746572766186
-:100890006C286D73290A333A096D61785F7370654E
-:1008A00065640A343A0974696D655F746F5F6D61E0
-:1008B000780A353A09776865656C5F6D61785F73B2
-:1008C000706565640A363A09776865656C5F7469B6
-:1008D0006D655F746F5F6D61780A0A703A097072B6
-:1008E000696E742076616C7565730A643A09736584
-:1008F000742064656661756C74730A75703A092BAF
-:10090000310A646F776E3A092D310A706775703A53
-:10091000092B31300A7067646F776E3A092D3130D8
-:100920000A0A7370656564203D2064656C746120FB
-:100930002A206D61785F7370656564202A202872B3
-:100940006570656174202F2074696D655F746F5FD9
-:100950006D6178290A003F004D3E2000433E200093
-:100960004C25640A000A092D20436F6E736F6C6575
-:10097000202D0A4553432F713A09717569740A6D28
-:100980003A096D6F7573656B65790A000A092D2048
-:100990004D61676963202D0A643A09646562756771
-:1009A0000A783A096465627567206D6174726978C6
-:1009B0000A6B3A096465627567206B6579626F61DD
-:1009C00072640A6D3A096465627567206D6F7573AC
-:1009D000650A763A0976657273696F6E0A733A0929
-:1009E0007374617475730A633A09636F6E736F6C25
-:1009F00065206D6F64650A302D343A096C61796544
-:100A000072302D34284631302D4634290A50617514
-:100A1000733A09626F6F746C6F616465720A653A4C
-:100A200009656570726F6D0A6E3A094E4B524F0A36
-:100A30007A3A09736C656570204C4544207465737F
-:100A4000740A000A002575002E6E6B726F3A200042
-:100A50000A002575002E737761705F6261636B73A6
-:100A60006C6173685F6261636B73706163653A2088
-:100A7000000A002575002E737761705F67726176DA
-:100A8000655F6573633A20000A002575002E6E6F5E
-:100A90005F6775693A20000A002575002E7377613B
-:100AA000705F72616C745F726775693A20000A004A
-:100AB0002575002E737761705F6C616C745F6C6775
-:100AC00075693A20000A002575002E636170736C09
-:100AD0006F636B5F746F5F636F6E74726F6C3A20DD
-:100AE000000A002575002E737761705F636F6E7466
-:100AF000726F6C5F636170736C6F636B3A20000A96
-:100B00000025303258006B65796D61705F636F6EE0
-:100B10006669672E7261773A20000A002575002EFB
-:100B20006D6F7573653A20000A002575002E6B65A0
-:100B300079626F6172643A20000A002575002E6D9B
-:100B400061747269783A20000A002575002E656E7E
-:100B500061626C653A20000A0025303258006465F5
-:100B60006275675F636F6E6669672E7261773A20A0
-:100B7000000A0025750064656661756C745F6C61C0
-:100B80007965723A20003F004E4B524F3A206F6613
-:100B9000660A004E4B524F3A206F6E0A0074696D20
-:100BA00065725F636F756E743A202530346C580A35
-:100BB000006B6579626F6172645F6E6B726F3A2071
-:100BC00025580A006B6579626F6172645F69646CB5
-:100BD000653A2025580A006B6579626F6172645F1F
-:100BE00070726F746F636F6C3A2025580A00686FDB
-:100BF00073745F6B6579626F6172645F6C65647357
-:100C000028293A2025580A000A092D2053746174B6
-:100C10007573202D0A004743433A20342E392E3372
-:100C2000204156522D4C4942433A20312E382E3124
-:100C3000204156525F415243483A20617672350A4C
-:100C4000004F5054494F4E533A204C554641204294
-:100C50004F4F544D41474943204D4F5553454B4508
-:100C6000592045585452414B455920434F4E534FFC
-:100C70004C4520434F4D4D414E44204E4B524F204A
-:100C80003531320A004255494C443A2030663263CD
-:100C9000373733202831313A30393A3531204A61FB
-:100CA0006E2020352032303136290A005649443A28
-:100CB00020307846454544284572676F446F782058
-:100CC000455A29205049443A20307831333037286A
-:100CD0004572676F446F7820455A29205645523A2D
-:100CE000203078303030310A00444553433A207484
-:100CF0002E6D2E6B2E206B6579626F61726420669B
-:100D000069726D7761726520666F72204572676FD8
-:100D1000646F780A000A092D2056657273696F6E38
-:100D2000202D0A000A6D6F7573653A206F66660A9A
-:100D3000000A6D6F7573653A206F6E0A000A6B6565
-:100D400079626F6172643A206F66660A000A6B65A9
-:100D500079626F6172643A206F6E0A000A6D617485
-:100D60007269783A206F66660A000A6D617472696A
-:100D7000783A206F6E0A000A64656275673A206FE0
-:100D80006E0A000A64656275673A206F66660A003B
-:100D90000A0A626F6F746C6F616465722E2E2E206A
-:100DA00000433E20006565636F6E6669673A0A001E
-:100DB000536C656570204C454420746573740A005B
-:100DC0000000000000000000000000010204060A0C
-:100DD0000F17202C3A4A5D71879DB3C7DAE9F5FCFD
-:100DE000FFFCF5E9DAC7B39D87715D4A3A2C2017FD
-:100DF0000F0A0604020100000000000000000000CD
-:100E000011241FBECFEFDAE0DEBFCDBF04B603FE74
-:100E100024C08091F9019091FA01A091FB01B09159
-:100E2000FC018730904BA740B04BB9F41092F90108
-:100E30001092FA011092FB011092FC0114BE84B7CB
-:100E4000877F84BF88E10FB6F8948093600010928A
-:100E500060000FBEE0E0FFE3099511E0A0E0B1E023
-:100E6000E0EAFBE502C005900D92AA33B107D9F77D
-:100E700011E0AAE3B1E001C01D92A93FB107E1F77B
-:100E80000E94900F0C94CE2D0C940000FF93EF93D2
-:100E9000E0913A01F0913B01309709F00995EF910B
-:100EA000FF910895FC018591803011F0EFDFFBCFB9
-:100EB0000895FF27E0E230E247FF0CC0419597FF1D
-:100EC00009C0EDE26095709580959095611D711D4A
-:100ED000811D911D27FF02C0219530E350E2AA2712
-:100EE000660F771F881F991FAA1FA41710F0A41B55
-:100EF00063955A95A9F7AA3008F0A95FA05DAF9352
-:100F0000F395611571058105910541F7ED3211F4F5
-:100F1000EF93F395F21718F43F93F395FBCF8F916E
-:100F2000B5DFFA95E1F70895E991F991859180305F
-:100F300021F0853219F0AADFF9CF089520E0E89476
-:100F400055915532C1F3503311F4689455915A3389
-:100F500048F4505390F3220F022E220F220F200D3F
-:100F6000250FF4CF0EF4219589919991533619F3F9
-:100F7000533729F1533559F1BC0188279927E89453
-:100F80005C3621F48991999168945591543639F4DD
-:100F900046EF7EF077FF0DC08FEF9FEF0AC0553709
-:100FA0004AE039F0583540E121F0523642E009F08C
-:100FB0000895FF93EF937DDFEF91FF91B7CFFF93FC
-:100FC000EF93FC0181918030B9F360DFFBCFFF9399
-:100FD000EF9368DFF1CFDF93CF93CDB7DEB72596E0
-:100FE000A3DFCF91DF91089561110BC0FC018281D5
-:100FF000882321F085EE0E946D1603C085EE0E94C5
-:10100000351780E090E0089508956091BC017091DB
-:10101000BD018091BE019091BF010E94FD205698B4
-:101020005E9825982D9826982E9827982F9881308D
-:1010300019F0823021F00895259A2D9A0895269A64
-:101040002E9A089585E098E0892B11F00E940508FA
-:1010500080E090E0089556985E9825982D982698FF
-:101060002E9827982F988FEF90E090938900809387
-:10107000880090938B0080938A0090938D008093DA
-:101080008C00259A2D9A2FEF80E792E02150804026
-:101090009040E1F700C00000269A2E9A2FEF80E7DB
-:1010A00092E0215080409040E1F700C00000279A74
-:1010B0002F9A2FEF80E792E0215080409040E1F797
-:1010C00000C0000025982D982FEF80E792E0215076
-:1010D00080409040E1F700C0000026982E982FEF46
-:1010E00080E792E0215080409040E1F700C000008E
-:1010F00027982F9856985E9825982D9826982E9880
-:1011000027982F98089589EA8093800089E080933A
-:10111000810024982C983F988AB18F748AB96E9870
-:10112000479A8BB1806B8BB9769A0E942B0884E02A
-:1011300098E0892B11F00E94040880E090E0089567
-:1011400080E28093000180913C0181110EC00E94D9
-:10115000EF0881E080933C012FEF83ED90E3215075
-:1011600080409040E1F700C0000080E40E94F50854
-:101170008093000181112EC00E941F0980930001FD
-:10118000811128C00E941F0980930001811122C093
-:101190008FE30E941F098093000181111BC00E94F0
-:1011A000170980E40E94F50880930001811112C0A4
-:1011B0008CE00E941F098093000181110BC00E94E6
-:1011C0001F0980930001811105C08FE30E941F0950
-:1011D000809300010E9417098091000108951092E8
-:1011E000B9008AE08093B800089594EA9093BC0017
-:1011F0009091BC0097FFFCCF9091B900987F9830F8
-:1012000021F0903111F081E008958093BB0084E8D3
-:101210008093BC008091BC0087FFFCCF8091B90017
-:10122000887F883111F0803471F780E0089584E977
-:101230008093BC008091BC0084FDFCCF0895809316
-:10124000BB0084E88093BC008091BC0087FFFCCF8A
-:101250009091B900987F81E0983209F480E0089578
-:1012600084E88093BC008091BC0087FFFCCF809114
-:10127000BB00089580910001811115C080E40E9497
-:10128000F5088093000181110CC082E10E941F09C2
-:1012900080930001811105C08FEF0E941F09809388
-:1012A00000010E94170984B1807F84B985B1807FD5
-:1012B00085B98AB1837F8AB98BB1837F8BB93E9818
-:1012C000469808950E94A008809300010E943A0960
-:1012D00080B38C7080BB81B3836F81BBAEE3B1E020
-:1012E000ECE4F1E08EE08E0F11921D928E13FCCF94
-:1012F00083E898E0892B11F00C94830808959F925D
-:10130000AF92BF92CF92DF92EF92FF920F931F9313
-:10131000CF93DF93809100018823E1F080913D011C
-:101320008F5F80933D01811115C082E493E00E949C
-:1013300052070E94A00880930001882329F088E2C8
-:1013400093E00E94520706C084E193E00E94520796
-:101350000E942B080EE311E0C0E0D0E0BB24B39460
-:1013600082E0A82ECC24C394D12C25E0E22E23E0E9
-:10137000F22EC730D10500F580910001811164C0C3
-:1013800080E40E94F50880930001811112C082E17F
-:101390000E941F098093000181110BC0C6010C2E11
-:1013A00001C0880F0A94EAF780950E941F09809374
-:1013B00000010E94170948C0CA30A1F028F4C830C3
-:1013C00059F0C93061F005C0CC3089F070F0CD30F3
-:1013D00089F0209A289810C0219A29980DC0229A45
-:1013E0002A980AC0239A2B9807C0529A01C0539A90
-:1013F0005B9802C03E9A469890EA9A95F1F79FB1A1
-:10140000799902C082E001C080E091709B25982B01
-:101410007C9902C084E001C080E0892B7D9902C0E4
-:1014200038E001C030E0832B7E9902C020E101C08A
-:1014300020E0822B9FB19095991F9927991F929533
-:10144000990F907E892B10C080910001811174C08A
-:1014500080E40E94F50880930001882309F459C0B4
-:10146000912C0E941709892DF8019081981739F164
-:10147000808380910101882301F18091D70180FF51
-:1014800004C08AE093E00E9452078091D70180FF58
|