annotate Scan/SonyOA-S3400/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) 2012,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 *
50
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
4 * of this software and associated documentation files (the "Software"), to deal
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
5 * in the Software without restriction, including without limitation the rights
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
7 * copies of the Software, and to permit persons to whom the Software is
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
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 *
50
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
10 * The above copyright notice and this permission notice shall be included in
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
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 *
50
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
19 * THE SOFTWARE.
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
20 */
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
21
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
22 // ----- Includes -----
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
23
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
24 // Compiler Includes
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
25 #include <stdint.h>
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
26
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
27 // Local Includes
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
28
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
29
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
30
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
31 // ----- Defines -----
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
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 0xFF // 255 - Size of the array space for the keyboard(max index)
50
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
34 #define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
35
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
36
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
37
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
38 // ----- Variables -----
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
39
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
40 extern volatile uint8_t KeyIndex_Buffer[KEYBOARD_BUFFER];
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
41 extern volatile uint8_t KeyIndex_BufferUsed;
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
42 extern volatile uint8_t KeyIndex_Add_InputSignal;
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
43
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
44
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
45
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
46 // ----- Functions -----
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
47
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
48 // 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
49 void Scan_setup( void );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
50 uint8_t Scan_loop( void );
50
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
51
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
52
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
53 // 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
54 uint8_t Scan_sendData( uint8_t dataPayload );
50
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
55
125
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
56 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
57 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
58 void Scan_lockKeyboard( void );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
59 void Scan_unlockKeyboard( void );
8dab4014c398 Major code cleanup and preparation for PartialMap Macro Module
Jacob Alexander <haata@kiibohd.com>
parents: 69
diff changeset
60 void Scan_resetKeyboard( void );
50
ff4ae9501930 Adding initial version of Sony OA-S3400 converter.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
61