annotate Scan/SonyNEWS/scan_loop.h @ 341:66eccdd9ced5

Code cleanup - Changing header file ifndef define to pragma once's - Removed duplicate output_com.h's
author Jacob Alexander <haata@kiibohd.com>
date Sun, 14 Jun 2015 13:56:56 -0700
parents 8dab4014c398
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
341
66eccdd9ced5 Code cleanup
Jacob Alexander <haata@kiibohd.com>
parents: 125
diff changeset
1 /* Copyright (C) 2011,2014-2015 by Jacob Alexander
125
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
2 *
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
4 * of this software and associated documentation files (the "Software"), to deal
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
5 * in the Software without restriction, including without limitation the rights
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
7 * copies of the Software, and to permit persons to whom the Software is
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
8 * furnished to do so, subject to the following conditions:
125
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
9 *
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
10 * The above copyright notice and this permission notice shall be included in
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
11 * all copies or substantial portions of the Software.
125
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
12 *
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
19 * THE SOFTWARE.
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
20 */
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
21
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
22 // ----- Includes -----
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
23
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
24 // Compiler Includes
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
25 #include <stdint.h>
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
26
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
27 // Local Includes
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
28
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
29
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
30
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
31 // ----- Defines -----
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
32
69
87658fa6091b Updating AVR abstraction to be compatible with ARM, nearly ready for ARM files
Jacob Alexander <triplehaata@gmail.com>
parents: 64
diff changeset
33 #define KEYBOARD_KEYS 0x68 // 104 - Size of the array space for the keyboard(max index)
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
34 #define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
35
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
36
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
38 // ----- Variables -----
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
39
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
40 extern volatile uint8_t KeyIndex_Buffer[KEYBOARD_BUFFER];
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
41 extern volatile uint8_t KeyIndex_BufferUsed;
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
42
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
43
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
44
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
45 // ----- Functions -----
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
46
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
47 // Functions used by main.c
125
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
48 void Scan_setup( void );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
49 uint8_t Scan_loop( void );
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
50
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
51
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
52 // Functions available to macro.c
125
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
53 uint8_t Scan_sendData( uint8_t dataPayload );
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
54
125
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
55 void Scan_finishedWithBuffer( uint8_t sentKeys );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
56 void Scan_finishedWithUSBBuffer( uint8_t sentKeys );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
57 void Scan_lockKeyboard( void );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
58 void Scan_unlockKeyboard( void );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
59 void Scan_resetKeyboard( void );
37
7f65034538ea Intial commit of the SonyNEWS scan module
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
60