Tried to initialize the buttons and slider but couldn't get it to work.

Dependencies:   mbed

Committer:
mturner5
Date:
Mon Sep 19 03:28:41 2016 +0000
Revision:
0:0d6b77c9ae01
basic v2;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mturner5 0:0d6b77c9ae01 1 #pragma once
mturner5 0:0d6b77c9ae01 2 /*^^^^^^^^^^^^^^^^ LCD HARDWARE CONECTION ^^^^^^^^^^^^^^^^^^^^^^^^*/
mturner5 0:0d6b77c9ae01 3 #define _LCDFRONTPLANES (8) // # of frontPlanes
mturner5 0:0d6b77c9ae01 4 #define _LCDBACKPLANES (4) // # of backplanes
mturner5 0:0d6b77c9ae01 5
mturner5 0:0d6b77c9ae01 6 /*
mturner5 0:0d6b77c9ae01 7 LCD logical organization definition
mturner5 0:0d6b77c9ae01 8 This section indicates how the LCD is distributed how many characteres of (7-seg, 14,seg, 16 seg, or colums in case of Dot Matrix) does it contain
mturner5 0:0d6b77c9ae01 9 First character is forced only one can be written
mturner5 0:0d6b77c9ae01 10
mturner5 0:0d6b77c9ae01 11 */
mturner5 0:0d6b77c9ae01 12 // HARDWARE_CONFIG Changing LCD pins Allows to verify all LCD pins easily
mturner5 0:0d6b77c9ae01 13 // if HARDWARE_CONFIG == 0 FRDM-KL46 RevB
mturner5 0:0d6b77c9ae01 14 // if HARDWARE_CONFIG == 1 FRDM-KL46 RevA
mturner5 0:0d6b77c9ae01 15 #ifdef FRDM_REVA
mturner5 0:0d6b77c9ae01 16 #define HARDWARE_CONFIG 1
mturner5 0:0d6b77c9ae01 17 #else
mturner5 0:0d6b77c9ae01 18 #define HARDWARE_CONFIG 0
mturner5 0:0d6b77c9ae01 19 #endif
mturner5 0:0d6b77c9ae01 20
mturner5 0:0d6b77c9ae01 21 #define _CHARNUM (4) //number of chars that can be written
mturner5 0:0d6b77c9ae01 22 #define _CHAR_SIZE (2) // Used only when Dot Matrix is used
mturner5 0:0d6b77c9ae01 23 #define _LCDTYPE (2) //indicate how many LCD_WF are required to write a single Character
mturner5 0:0d6b77c9ae01 24
mturner5 0:0d6b77c9ae01 25 /*
mturner5 0:0d6b77c9ae01 26 Following definitions indicate how characters are associated to waveform
mturner5 0:0d6b77c9ae01 27 */
mturner5 0:0d6b77c9ae01 28 /* Hardware configuration */
mturner5 0:0d6b77c9ae01 29 #if HARDWARE_CONFIG == 0
mturner5 0:0d6b77c9ae01 30
mturner5 0:0d6b77c9ae01 31 // LCD PIN1 to LCDWF0 Rev B
mturner5 0:0d6b77c9ae01 32 #define CHAR1a 37 // LCD Pin 5
mturner5 0:0d6b77c9ae01 33 #define CHAR1b 17 // LCD Pin 6
mturner5 0:0d6b77c9ae01 34 #define CHAR2a 7 // LCD Pin 7
mturner5 0:0d6b77c9ae01 35 #define CHAR2b 8 // LCD Pin 8
mturner5 0:0d6b77c9ae01 36 #define CHAR3a 53 // LCD Pin 9
mturner5 0:0d6b77c9ae01 37 #define CHAR3b 38 // LCD Pin 10
mturner5 0:0d6b77c9ae01 38 #define CHAR4a 10 // LCD Pin 11
mturner5 0:0d6b77c9ae01 39 #define CHAR4b 11 // LCD Pin 12
mturner5 0:0d6b77c9ae01 40 #define CHARCOM0 40 // LCD Pin 1
mturner5 0:0d6b77c9ae01 41 #define CHARCOM1 52 // LCD Pin 2
mturner5 0:0d6b77c9ae01 42 #define CHARCOM2 19 // LCD Pin 3
mturner5 0:0d6b77c9ae01 43 #define CHARCOM3 18 // LCD Pin 4
mturner5 0:0d6b77c9ae01 44
mturner5 0:0d6b77c9ae01 45 // LCD PIN1 to LCDWF2 for FRDM-KL46Z
mturner5 0:0d6b77c9ae01 46 #elif HARDWARE_CONFIG == 1
mturner5 0:0d6b77c9ae01 47 #define CHAR1a 37 // LCD Pin 5
mturner5 0:0d6b77c9ae01 48 #define CHAR1b 17 // LCD Pin 6
mturner5 0:0d6b77c9ae01 49 #define CHAR2a 7 // LCD Pin 7
mturner5 0:0d6b77c9ae01 50 #define CHAR2b 8 // LCD Pin 8
mturner5 0:0d6b77c9ae01 51 #define CHAR3a 12 // LCD Pin 9
mturner5 0:0d6b77c9ae01 52 #define CHAR3b 26 // LCD Pin 10
mturner5 0:0d6b77c9ae01 53 #define CHAR4a 10 // LCD Pin 11
mturner5 0:0d6b77c9ae01 54 #define CHAR4b 11 // LCD Pin 12
mturner5 0:0d6b77c9ae01 55 #define CHARCOM0 51 // LCD Pin 1
mturner5 0:0d6b77c9ae01 56 #define CHARCOM1 52 // LCD Pin 2
mturner5 0:0d6b77c9ae01 57 #define CHARCOM2 19 // LCD Pin 3
mturner5 0:0d6b77c9ae01 58 #define CHARCOM3 16 // LCD Pin 4
mturner5 0:0d6b77c9ae01 59
mturner5 0:0d6b77c9ae01 60 #endif
mturner5 0:0d6b77c9ae01 61
mturner5 0:0d6b77c9ae01 62
mturner5 0:0d6b77c9ae01 63 /*Ascii Codification table information */
mturner5 0:0d6b77c9ae01 64 #define ASCCI_TABLE_START '0' // indicates which is the first Ascii character in the table
mturner5 0:0d6b77c9ae01 65 #define ASCCI_TABLE_END 'Z' // indicates which is the first Ascii character in the table
mturner5 0:0d6b77c9ae01 66 #define BLANK_CHARACTER '>' // Indicate which ASCII character is a blank character (depends on ASCII table)
mturner5 0:0d6b77c9ae01 67
mturner5 0:0d6b77c9ae01 68 #define _ALLON 0xFF // Used for ALL_on function
mturner5 0:0d6b77c9ae01 69
mturner5 0:0d6b77c9ae01 70 #define SEGDP 0x01
mturner5 0:0d6b77c9ae01 71 #define SEGC 0x02
mturner5 0:0d6b77c9ae01 72 #define SEGB 0x04
mturner5 0:0d6b77c9ae01 73 #define SEGA 0x08
mturner5 0:0d6b77c9ae01 74
mturner5 0:0d6b77c9ae01 75 #define SEGD 0x01
mturner5 0:0d6b77c9ae01 76 #define SEGE 0x02
mturner5 0:0d6b77c9ae01 77 #define SEGG 0x04
mturner5 0:0d6b77c9ae01 78 #define SEGF 0x08
mturner5 0:0d6b77c9ae01 79
mturner5 0:0d6b77c9ae01 80
mturner5 0:0d6b77c9ae01 81 /* Fault detect initial limits */
mturner5 0:0d6b77c9ae01 82
mturner5 0:0d6b77c9ae01 83 /* Fault detect initial parameters and limits */
mturner5 0:0d6b77c9ae01 84 #define FAULTD_FP_FDPRS FDPRS_32
mturner5 0:0d6b77c9ae01 85 #define FAULTD_FP_FDSWW FDSWW_128
mturner5 0:0d6b77c9ae01 86 #define FAULTD_BP_FDPRS FDPRS_64
mturner5 0:0d6b77c9ae01 87 #define FAULTD_BP_FDSWW FDSWW_128
mturner5 0:0d6b77c9ae01 88
mturner5 0:0d6b77c9ae01 89 #define FAULTD_FP_HI 127
mturner5 0:0d6b77c9ae01 90 #define FAULTD_FP_LO 110
mturner5 0:0d6b77c9ae01 91 #define FAULTD_BP_HI 127
mturner5 0:0d6b77c9ae01 92 #define FAULTD_BP_LO 110
mturner5 0:0d6b77c9ae01 93 #define FAULTD_TIME 6
mturner5 0:0d6b77c9ae01 94
mturner5 0:0d6b77c9ae01 95 extern const uint8_t WF_ORDERING_TABLE[]; // Logical Front plane N to LCD_WFx
mturner5 0:0d6b77c9ae01 96
mturner5 0:0d6b77c9ae01 97