1 /* --COPYRIGHT--,BSD 2 * Copyright (c) 2017, Texas Instruments Incorporated 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * * Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * * Neither the name of Texas Instruments Incorporated nor the names of 17 * its contributors may be used to endorse or promote products derived 18 * from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * --/COPYRIGHT--*/ 32 #ifndef LCD_F_H_ 33 #define LCD_F_H_ 34 35 #include <stdbool.h> 36 #include <stdint.h> 37 #include <ti/devices/msp432p4xx/inc/msp.h> 38 39 /* Define to ensure that our current MSP432 has the LCD_F module. This 40 definition is included in the device specific header file */ 41 #ifdef __MCU_HAS_LCD_F__ 42 43 //***************************************************************************** 44 // 45 //! \addtogroup lcd_f_api 46 //! @{ 47 // 48 //***************************************************************************** 49 50 //***************************************************************************** 51 // 52 // If building with a C++ compiler, make all of the definitions in this header 53 // have a C binding. 54 // 55 //***************************************************************************** 56 #ifdef __cplusplus 57 extern "C" 58 { 59 #endif 60 61 typedef struct LCD_F_initParam 62 { 63 //! Selects the clock that will be used by the LCD_F_E. 64 //! \n Valid values are: 65 //! - \b LCD_F_CLOCKSOURCE_XTCLK [Default] 66 //! - \b LCD_F_CLOCKSOURCE_ACLK [Default] 67 //! - \b LCD_F_CLOCKSOURCE_VLOCLK 68 //! - \b LCD_F_CLOCKSOURCE_LFXT 69 uint32_t clockSource; 70 //! Selects the divider for LCD frequency. 71 //! \n Valid values are: 72 //! - \b LCD_F_CLOCKDIVIDER_1 [Default] 73 //! - \b LCD_F_CLOCKDIVIDER_2 74 //! - \b LCD_F_CLOCKDIVIDER_3 75 //! - \b LCD_F_CLOCKDIVIDER_4 76 //! - \b LCD_F_CLOCKDIVIDER_5 77 //! - \b LCD_F_CLOCKDIVIDER_6 78 //! - \b LCD_F_CLOCKDIVIDER_7 79 //! - \b LCD_F_CLOCKDIVIDER_8 80 //! - \b LCD_F_CLOCKDIVIDER_9 81 //! - \b LCD_F_CLOCKDIVIDER_10 82 //! - \b LCD_F_CLOCKDIVIDER_11 83 //! - \b LCD_F_CLOCKDIVIDER_12 84 //! - \b LCD_F_CLOCKDIVIDER_13 85 //! - \b LCD_F_CLOCKDIVIDER_14 86 //! - \b LCD_F_CLOCKDIVIDER_15 87 //! - \b LCD_F_CLOCKDIVIDER_16 88 //! - \b LCD_F_CLOCKDIVIDER_17 89 //! - \b LCD_F_CLOCKDIVIDER_18 90 //! - \b LCD_F_CLOCKDIVIDER_19 91 //! - \b LCD_F_CLOCKDIVIDER_20 92 //! - \b LCD_F_CLOCKDIVIDER_21 93 //! - \b LCD_F_CLOCKDIVIDER_22 94 //! - \b LCD_F_CLOCKDIVIDER_23 95 //! - \b LCD_F_CLOCKDIVIDER_24 96 //! - \b LCD_F_CLOCKDIVIDER_25 97 //! - \b LCD_F_CLOCKDIVIDER_26 98 //! - \b LCD_F_CLOCKDIVIDER_27 99 //! - \b LCD_F_CLOCKDIVIDER_28 100 //! - \b LCD_F_CLOCKDIVIDER_29 101 //! - \b LCD_F_CLOCKDIVIDER_30 102 //! - \b LCD_F_CLOCKDIVIDER_31 103 //! - \b LCD_F_CLOCKDIVIDER_32 104 uint32_t clockDivider; 105 //! Selects the prescaler 106 //! \n Valid values are: 107 //! - \b LCD_F_CLOCKPRESCALER_1 [Default] 108 //! - \b LCD_F_CLOCKPRESCALER_2 109 //! - \b LCD_F_CLOCKPRESCALER_4 110 //! - \b LCD_F_CLOCKPRESCALER_8 111 //! - \b LCD_F_CLOCKPRESCALER_16 112 //! - \b LCD_F_CLOCKPRESCALER_32 113 uint32_t clockPrescaler; 114 //! Selects LCD_F_E mux rate. 115 //! \n Valid values are: 116 //! - \b LCD_F_STATIC [Default] 117 //! - \b LCD_F_2_MUX 118 //! - \b LCD_F_3_MUX 119 //! - \b LCD_F_4_MUX 120 //! - \b LCD_F_5_MUX 121 //! - \b LCD_F_6_MUX 122 //! - \b LCD_F_7_MUX 123 //! - \b LCD_F_8_MUX 124 uint32_t muxRate; 125 //! Selects LCD waveform mode. 126 //! \n Valid values are: 127 //! - \b LCD_F_STANDARD_WAVEFORMS [Default] 128 //! - \b LCD_F_LOW_POWER_WAVEFORMS 129 uint32_t waveforms; 130 //! Sets LCD segment on/off. 131 //! \n Valid values are: 132 //! - \b LCD_F_SEGMENTS_DISABLED [Default] 133 //! - \b LCD_F_SEGMENTS_ENABLED 134 uint32_t segments; 135 } LCD_F_Config; 136 137 //***************************************************************************** 138 // 139 // The following are values that can be passed to the initParams parameter for 140 // functions: LCD_F_initModule(). 141 // 142 //***************************************************************************** 143 #define LCD_F_CLOCKSOURCE_ACLK (LCD_F_CTL_SSEL_0) 144 #define LCD_F_CLOCKSOURCE_VLOCLK (LCD_F_CTL_SSEL_1) 145 #define LCD_F_CLOCKSOURCE_REFOCLK (LCD_F_CTL_SSEL_2) 146 #define LCD_F_CLOCKSOURCE_LFXT (LCD_F_CTL_SSEL_3) 147 148 149 //***************************************************************************** 150 // 151 // The following are values that can be passed to the initParams parameter for 152 // functions: LCD_F_initModule(). 153 // 154 //***************************************************************************** 155 #define LCD_F_CLOCKDIVIDER_1 0x0 156 #define LCD_F_CLOCKDIVIDER_2 0x800 157 #define LCD_F_CLOCKDIVIDER_3 0x1000 158 #define LCD_F_CLOCKDIVIDER_4 0x1800 159 #define LCD_F_CLOCKDIVIDER_5 0x2000 160 #define LCD_F_CLOCKDIVIDER_6 0x2800 161 #define LCD_F_CLOCKDIVIDER_7 0x3000 162 #define LCD_F_CLOCKDIVIDER_8 0x3800 163 #define LCD_F_CLOCKDIVIDER_9 0x4000 164 #define LCD_F_CLOCKDIVIDER_10 0x4800 165 #define LCD_F_CLOCKDIVIDER_11 0x5000 166 #define LCD_F_CLOCKDIVIDER_12 0x5800 167 #define LCD_F_CLOCKDIVIDER_13 0x6000 168 #define LCD_F_CLOCKDIVIDER_14 0x6800 169 #define LCD_F_CLOCKDIVIDER_15 0x7000 170 #define LCD_F_CLOCKDIVIDER_16 0x7800 171 #define LCD_F_CLOCKDIVIDER_17 0x8000 172 #define LCD_F_CLOCKDIVIDER_18 0x8800 173 #define LCD_F_CLOCKDIVIDER_19 0x9000 174 #define LCD_F_CLOCKDIVIDER_20 0x9800 175 #define LCD_F_CLOCKDIVIDER_21 0xa000 176 #define LCD_F_CLOCKDIVIDER_22 0xa800 177 #define LCD_F_CLOCKDIVIDER_23 0xb000 178 #define LCD_F_CLOCKDIVIDER_24 0xb800 179 #define LCD_F_CLOCKDIVIDER_25 0xc000 180 #define LCD_F_CLOCKDIVIDER_26 0xc800 181 #define LCD_F_CLOCKDIVIDER_27 0xd000 182 #define LCD_F_CLOCKDIVIDER_28 0xd800 183 #define LCD_F_CLOCKDIVIDER_29 0xe000 184 #define LCD_F_CLOCKDIVIDER_30 0xe800 185 #define LCD_F_CLOCKDIVIDER_31 0xf000 186 #define LCD_F_CLOCKDIVIDER_32 0xf800 187 188 //***************************************************************************** 189 // 190 // The following are values that can be passed to the initParams parameter for 191 // functions: LCD_F_initModule(). 192 // 193 //***************************************************************************** 194 #define LCD_F_CLOCKPRESCALER_1 (LCD_F_CTL_PRE_0) 195 #define LCD_F_CLOCKPRESCALER_2 (LCD_F_CTL_PRE_1) 196 #define LCD_F_CLOCKPRESCALER_4 (LCD_F_CTL_PRE_2) 197 #define LCD_F_CLOCKPRESCALER_8 (LCD_F_CTL_PRE_3) 198 #define LCD_F_CLOCKPRESCALER_16 (LCD_F_CTL_PRE_4) 199 #define LCD_F_CLOCKPRESCALER_32 (LCD_F_CTL_PRE_5) 200 201 //***************************************************************************** 202 // 203 // The following are values that can be passed to the initParams parameter for 204 // functions: LCD_F_initModule(). 205 // 206 //***************************************************************************** 207 #define LCD_F_STATIC (LCD_F_CTL_MX_0) 208 #define LCD_F_2_MUX (LCD_F_CTL_MX_1) 209 #define LCD_F_3_MUX (LCD_F_CTL_MX_2) 210 #define LCD_F_4_MUX (LCD_F_CTL_MX_3) 211 #define LCD_F_5_MUX (LCD_F_CTL_MX_4) 212 #define LCD_F_6_MUX (LCD_F_CTL_MX_5) 213 #define LCD_F_7_MUX (LCD_F_CTL_MX_6) 214 #define LCD_F_8_MUX (LCD_F_CTL_MX_7) 215 216 //***************************************************************************** 217 // 218 // The following are values that can be passed to the v2v3v4Source parameter 219 // for functions: LCD_F_setVLCDSource(). 220 // 221 //***************************************************************************** 222 #define LCD_F_V2V3V4_GENERATED_INTERNALLY_NOT_SWITCHED_TO_PINS (0x0) 223 #define LCD_F_V2V3V4_GENERATED_INTERNALLY_SWITCHED_TO_PINS (LCD_F_VCTL_REXT) 224 #define LCD_F_V2V3V4_SOURCED_EXTERNALLY (LCD_F_VCTL_EXTBIAS) 225 226 //***************************************************************************** 227 // 228 // The following are values that can be passed to the v5Source parameter for 229 // functions: LCD_F_setVLCDSource(). 230 // 231 //***************************************************************************** 232 #define LCD_F_V5_VSS (0x0) 233 #define LCD_F_V5_SOURCED_FROM_R03 (LCD_F_VCTL_R03EXT) 234 235 //***************************************************************************** 236 // 237 // The following are values that can be passed to the initParams parameter for 238 // functions: LCD_F_initModule(). 239 // 240 //***************************************************************************** 241 #define LCD_F_STANDARD_WAVEFORMS (0x0) 242 #define LCD_F_LOW_POWER_WAVEFORMS (LCD_F_CTL_LP) 243 244 //***************************************************************************** 245 // 246 // The following are values that can be passed to the initParams parameter for 247 // functions: LCD_F_initModule(). 248 // 249 //***************************************************************************** 250 #define LCD_F_SEGMENTS_DISABLED (0x0) 251 #define LCD_F_SEGMENTS_ENABLED (LCD_F_CTL_SON) 252 253 //***************************************************************************** 254 // 255 // The following are values that can be passed to the mask parameter for 256 // functions: LCD_F_clearInterrupt(), LCD_F_getInterruptStatus(), 257 // LCD_F_enableInterrupt(), and LCD_F_disableInterrupt() as well as returned by 258 // the LCD_F_getInterruptStatus() function. 259 // 260 //***************************************************************************** 261 #define LCD_F_BLINKING_SEGMENTS_ON_INTERRUPT (LCD_F_IE_BLKONIE) 262 #define LCD_F_BLINKING_SEGMENTS_OFF_INTERRUPT (LCD_F_IE_BLKOFFIE) 263 #define LCD_F_FRAME_INTERRUPT (LCD_F_IE_FRMIE) 264 #define LCD_F_ANIMATION_LOOP_INTERRUPT (LCD_F_IE_ANMLOOPIE) 265 #define LCD_F_ANIMATION_STEP_INTERRUPT (LCD_F_IE_ANMSTPIE) 266 267 //***************************************************************************** 268 // 269 // The following are values that can be passed to the displayMemory parameter 270 // for functions: LCD_F_selectDisplayMemory(). 271 // 272 //***************************************************************************** 273 #define LCD_F_DISPLAYSOURCE_MEMORY (0x0) 274 #define LCD_F_DISPLAYSOURCE_BLINKINGMEMORY (0x1) 275 276 //***************************************************************************** 277 // 278 // The following are values that can be passed to the clockPrescalar parameter 279 // for functions: LCD_F_setBlinkingControl(). 280 // 281 //***************************************************************************** 282 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_512 LCD_F_BMCTL_BLKPRE_0 283 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_1024 LCD_F_BMCTL_BLKPRE_1 284 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_2048 LCD_F_BMCTL_BLKPRE_2 285 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_4096 LCD_F_BMCTL_BLKPRE_3 286 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_8162 LCD_F_BMCTL_BLKPRE_4 287 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_16384 LCD_F_BMCTL_BLKPRE_5 288 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_32768 LCD_F_BMCTL_BLKPRE_6 289 #define LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_65536 LCD_F_BMCTL_BLKPRE_7 290 291 //***************************************************************************** 292 // 293 // The following are values that can be passed to the clockPrescalar parameter 294 // for functions: LCD_F_setBlinkingControl(). 295 // 296 //***************************************************************************** 297 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_1 LCD_F_BMCTL_BLKDIV_0 298 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_2 LCD_F_BMCTL_BLKDIV_1 299 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_3 LCD_F_BMCTL_BLKDIV_2 300 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_4 LCD_F_BMCTL_BLKDIV_3 301 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_5 LCD_F_BMCTL_BLKDIV_4 302 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_6 LCD_F_BMCTL_BLKDIV_5 303 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_7 LCD_F_BMCTL_BLKDIV_6 304 #define LCD_F_BLINK_FREQ_CLOCK_DIVIDER_8 LCD_F_BMCTL_BLKDIV_7 305 306 //***************************************************************************** 307 // 308 // The following are values that can be passed to the mode parameter for 309 // functions: LCD_F_setBlinkingControl(). 310 // 311 //***************************************************************************** 312 #define LCD_F_BLINK_MODE_DISABLED (LCD_F_BMCTL_BLKMOD_0) 313 #define LCD_F_BLINK_MODE_INDIVIDUAL_SEGMENTS (LCD_F_BMCTL_BLKMOD_1) 314 #define LCD_F_BLINK_MODE_ALL_SEGMENTS (LCD_F_BMCTL_BLKMOD_2) 315 #define LCD_F_BLINK_MODE_SWITCHING_BETWEEN_DISPLAY_CONTENTS \ 316 (LCD_F_BMCTL_BLKMOD_3) 317 318 //***************************************************************************** 319 // 320 // The following are values that can be passed to the clockPrescalar parameter 321 // for functions: LCD_F_setAnimationControl(). 322 // 323 //***************************************************************************** 324 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_512 LCD_F_ANMCTL_ANMPRE_0 325 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_1024 LCD_F_ANMCTL_ANMPRE_1 326 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_2048 LCD_F_ANMCTL_ANMPRE_2 327 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_4096 LCD_F_ANMCTL_ANMPRE_3 328 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_8162 LCD_F_ANMCTL_ANMPRE_4 329 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_16384 LCD_F_ANMCTL_ANMPRE_5 330 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_32768 LCD_F_ANMCTL_ANMPRE_6 331 #define LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_65536 LCD_F_ANMCTL_ANMPRE_7 332 333 //***************************************************************************** 334 // 335 // The following are values that can be passed to the clockPrescalar parameter 336 // for functions: LCD_F_setAnimationControl(). 337 // 338 //***************************************************************************** 339 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_1 LCD_F_ANMCTL_ANMDIV_0 340 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_2 LCD_F_ANMCTL_ANMDIV_1 341 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_3 LCD_F_ANMCTL_ANMDIV_2 342 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_4 LCD_F_ANMCTL_ANMDIV_3 343 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_5 LCD_F_ANMCTL_ANMDIV_4 344 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_6 LCD_F_ANMCTL_ANMDIV_5 345 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_7 LCD_F_ANMCTL_ANMDIV_6 346 #define LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_8 LCD_F_ANMCTL_ANMDIV_7 347 348 //***************************************************************************** 349 // 350 // The following are values that can be passed to the mode parameter for 351 // functions: LCD_F_setAnimationControl(). 352 // 353 //***************************************************************************** 354 #define LCD_F_ANIMATION_FRAMES_T0_TO_T7 LCD_F_ANMCTL_ANMSTP_7 355 #define LCD_F_ANIMATION_FRAMES_T0_TO_T6 LCD_F_ANMCTL_ANMSTP_6 356 #define LCD_F_ANIMATION_FRAMES_T0_TO_T5 LCD_F_ANMCTL_ANMSTP_5 357 #define LCD_F_ANIMATION_FRAMES_T0_TO_T4 LCD_F_ANMCTL_ANMSTP_4 358 #define LCD_F_ANIMATION_FRAMES_T0_TO_T3 LCD_F_ANMCTL_ANMSTP_3 359 #define LCD_F_ANIMATION_FRAMES_T0_TO_T2 LCD_F_ANMCTL_ANMSTP_2 360 #define LCD_F_ANIMATION_FRAMES_T0_TO_T1 LCD_F_ANMCTL_ANMSTP_1 361 #define LCD_F_ANIMATION_FRAMES_T0 LCD_F_ANMCTL_ANMSTP_0 362 363 //***************************************************************************** 364 // 365 // The following are values that can be passed to the startPin parameter for 366 // functions: LCD_F_setPinsAsLCDFunction(); the endPin parameter for 367 // functions: LCD_F_setPinsAsLCDFunction(); the pin parameter for functions: 368 // LCD_F_setPinAsLCDFunction(), LCD_F_setPinAsPortFunction(), 369 // LCD_F_setPinAsCOM(), and LCD_F_setPinAsSEG(). 370 // 371 //***************************************************************************** 372 #define LCD_F_SEGMENT_LINE_0 (0) 373 #define LCD_F_SEGMENT_LINE_1 (1) 374 #define LCD_F_SEGMENT_LINE_2 (2) 375 #define LCD_F_SEGMENT_LINE_3 (3) 376 #define LCD_F_SEGMENT_LINE_4 (4) 377 #define LCD_F_SEGMENT_LINE_5 (5) 378 #define LCD_F_SEGMENT_LINE_6 (6) 379 #define LCD_F_SEGMENT_LINE_7 (7) 380 #define LCD_F_SEGMENT_LINE_8 (8) 381 #define LCD_F_SEGMENT_LINE_9 (9) 382 #define LCD_F_SEGMENT_LINE_10 (10) 383 #define LCD_F_SEGMENT_LINE_11 (11) 384 #define LCD_F_SEGMENT_LINE_12 (12) 385 #define LCD_F_SEGMENT_LINE_13 (13) 386 #define LCD_F_SEGMENT_LINE_14 (14) 387 #define LCD_F_SEGMENT_LINE_15 (15) 388 #define LCD_F_SEGMENT_LINE_16 (16) 389 #define LCD_F_SEGMENT_LINE_17 (17) 390 #define LCD_F_SEGMENT_LINE_18 (18) 391 #define LCD_F_SEGMENT_LINE_19 (19) 392 #define LCD_F_SEGMENT_LINE_20 (20) 393 #define LCD_F_SEGMENT_LINE_21 (21) 394 #define LCD_F_SEGMENT_LINE_22 (22) 395 #define LCD_F_SEGMENT_LINE_23 (23) 396 #define LCD_F_SEGMENT_LINE_24 (24) 397 #define LCD_F_SEGMENT_LINE_25 (25) 398 #define LCD_F_SEGMENT_LINE_26 (26) 399 #define LCD_F_SEGMENT_LINE_27 (27) 400 #define LCD_F_SEGMENT_LINE_28 (28) 401 #define LCD_F_SEGMENT_LINE_29 (29) 402 #define LCD_F_SEGMENT_LINE_30 (30) 403 #define LCD_F_SEGMENT_LINE_31 (31) 404 #define LCD_F_SEGMENT_LINE_32 (32) 405 #define LCD_F_SEGMENT_LINE_33 (33) 406 #define LCD_F_SEGMENT_LINE_34 (34) 407 #define LCD_F_SEGMENT_LINE_35 (35) 408 #define LCD_F_SEGMENT_LINE_36 (36) 409 #define LCD_F_SEGMENT_LINE_37 (37) 410 #define LCD_F_SEGMENT_LINE_38 (38) 411 #define LCD_F_SEGMENT_LINE_39 (39) 412 #define LCD_F_SEGMENT_LINE_40 (40) 413 #define LCD_F_SEGMENT_LINE_41 (41) 414 #define LCD_F_SEGMENT_LINE_42 (42) 415 #define LCD_F_SEGMENT_LINE_43 (43) 416 #define LCD_F_SEGMENT_LINE_44 (44) 417 #define LCD_F_SEGMENT_LINE_45 (45) 418 #define LCD_F_SEGMENT_LINE_46 (46) 419 #define LCD_F_SEGMENT_LINE_47 (47) 420 421 422 //***************************************************************************** 423 // 424 // The following are values that can be passed to the com parameter for 425 // functions: LCD_F_setPinAsCOM(). 426 // 427 //***************************************************************************** 428 #define LCD_F_MEMORY_COM0 (0x01) 429 #define LCD_F_MEMORY_COM1 (0x02) 430 #define LCD_F_MEMORY_COM2 (0x04) 431 #define LCD_F_MEMORY_COM3 (0x08) 432 #define LCD_F_MEMORY_COM4 (0x10) 433 #define LCD_F_MEMORY_COM5 (0x20) 434 #define LCD_F_MEMORY_COM6 (0x40) 435 #define LCD_F_MEMORY_COM7 (0x80) 436 437 //***************************************************************************** 438 // 439 // The following are values that can be passed to the bias parameter for 440 // functions: LCD_F_selectBias(). 441 // 442 //***************************************************************************** 443 #define LCD_F_BIAS_1_3 (0x0) 444 #define LCD_F_BIAS_1_2 (LCD_F_VCTL_LCD2B) 445 #define LCD_F_BIAS_1_4 (LCD_F_VCTL_LCD2B) 446 447 /* Internal Macros for indexing */ 448 #define OFS_LCDM0W 0x120 449 #define OFS_LCDBM0W 0x160 450 451 //***************************************************************************** 452 // 453 //! \brief Initializes the LCD_F Module. 454 //! 455 //! This function initializes the LCD_F but without turning on. It bascially 456 //! setup the clock source, clock divider, mux rate, low-power waveform and 457 //! segments on/off. After calling this function, user can enable/disable 458 //! internal reference voltage or pin SEG/COM configurations. 459 //! 460 //! \param initParams is the pointer to LCD_F_Config structure. 461 //! 462 //! \return None 463 // 464 //***************************************************************************** 465 extern void LCD_F_initModule(LCD_F_Config *initParams); 466 467 //***************************************************************************** 468 // 469 //! \brief Turns on the LCD_F module. 470 //! 471 //! This function turns the LCD_F on. 472 //! 473 //! \return None 474 // 475 //***************************************************************************** 476 extern void LCD_F_turnOn(void); 477 478 //***************************************************************************** 479 // 480 //! \brief Turns the LCD_F off. 481 //! 482 //! This function turns the LCD_F off. 483 //! 484 //! \return None 485 // 486 //***************************************************************************** 487 extern void LCD_F_turnOff(void); 488 489 /* Memory management functions */ 490 491 //***************************************************************************** 492 // 493 //! \brief Clears all LCD_F memory registers. 494 //! 495 //! This function clears all LCD_F memory registers. 496 //! 497 //! \return None 498 // 499 //***************************************************************************** 500 extern void LCD_F_clearAllMemory(void); 501 502 //***************************************************************************** 503 // 504 //! \brief Clears all LCD_F blinking memory registers. 505 //! 506 //! This function clears all LCD_F blinking memory registers. 507 //! 508 //! \return None 509 // 510 //***************************************************************************** 511 extern void LCD_F_clearAllBlinkingMemory(void); 512 513 //***************************************************************************** 514 // 515 //! \brief Selects display memory. 516 //! 517 //! This function selects display memory either from memory or blinking memory. 518 //! Please note if the blinking mode is selected as 519 //! LCD_F_BLINKMODE_INDIVIDUALSEGMENTS or LCD_F_BLINKMODE_ALLSEGMENTS or mux 520 //! rate >=5, display memory can not be changed. If 521 //! LCD_F_BLINKMODE_SWITCHDISPLAYCONTENTS is selected, display memory bit 522 //! reflects current displayed memory. 523 //! 524 //! \param displayMemory is the desired displayed memory. 525 //! Valid values are: 526 //! - \b LCD_F_DISPLAYSOURCE_MEMORY [Default] 527 //! - \b LCD_F_DISPLAYSOURCE_BLINKINGMEMORY 528 //! 529 //! \return None 530 // 531 //***************************************************************************** 532 extern void LCD_F_selectDisplayMemory(uint_fast16_t displayMemory); 533 534 //***************************************************************************** 535 // 536 //! \brief Sets the blinking control register. 537 //! 538 //! This function sets the blink control related parameter, including blink 539 //! clock frequency prescalar and blink mode. 540 //! 541 //! \param clockPrescalar is the clock pre-scalar for blinking frequency. 542 //! Valid values are: 543 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_512 [Default] 544 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_1024 545 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_2048 546 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_4096 547 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_8162 548 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_16384 549 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_32768 550 //! - \b LCD_F_BLINK_FREQ_CLOCK_PRESCALAR_65536 551 //! \param clockDivider is the clock divider for blinking frequency. 552 //! Valid values are: 553 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_1 [Default] 554 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_2 555 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_3 556 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_4 557 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_5 558 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_6 559 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_7 560 //! - \b LCD_F_BLINK_FREQ_CLOCK_DIVIDER_8 561 //! \param mode is the select for blinking mode. 562 //! Valid values are: 563 //! - \b LCD_F_BLINK_MODE_DISABLED [Default] 564 //! - \b LCD_F_BLINK_MODE_INDIVIDUAL_SEGMENTS 565 //! - \b LCD_F_BLINK_MODE_ALL_SEGMENTS 566 //! - \b LCD_F_BLINK_MODE_SWITCHING_BETWEEN_DISPLAY_CONTENTS 567 //! 568 //! \return None 569 // 570 //***************************************************************************** 571 extern void LCD_F_setBlinkingControl(uint_fast16_t clockPrescalar, 572 uint_fast16_t divider, uint_fast16_t mode); 573 574 //***************************************************************************** 575 // 576 //! \brief Sets the animation control register. 577 //! 578 //! This function sets the animation control related parameter, including 579 //! animation clock frequency prescalar, divider, and frame settings 580 //! 581 //! \param clockPrescalar is the clock pre-scalar for animation frequency. 582 //! Valid values are: 583 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_512 [Default] 584 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_1024 585 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_2048 586 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_4096 587 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_8162 588 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_16384 589 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_32768 590 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_PRESCALAR_65536 591 //! \param clockDivider is the clock divider for animation frequency. 592 //! Valid values are: 593 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_1 [Default] 594 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_2 595 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_3 596 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_4 597 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_5 598 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_6 599 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_7 600 //! - \b LCD_F_ANIMATION_FREQ_CLOCK_DIVIDER_8 601 //! \param frames is number of animations frames to be repeated 602 //! Valid values are: 603 //! - \b LCD_F_ANIMATION_FRAMES_T0_TO_T7 604 //! - \b LCD_F_ANIMATION_FRAMES_T0_TO_T6 605 //! - \b LCD_F_ANIMATION_FRAMES_T0_TO_T5 606 //! - \b LCD_F_ANIMATION_FRAMES_T0_TO_T4 607 //! - \b LCD_F_ANIMATION_FRAMES_T0_TO_T3 608 //! - \b LCD_F_ANIMATION_FRAMES_T0_TO_T2 609 //! - \b LCD_F_ANIMATION_FRAMES_T0_TO_T1 610 //! - \b LCD_F_ANIMATION_FRAMES_T0 611 //! 612 //! \return None 613 // 614 //***************************************************************************** 615 extern void LCD_F_setAnimationControl(uint_fast16_t clockPrescalar, 616 uint_fast16_t divider, 617 uint_fast16_t frames); 618 619 //***************************************************************************** 620 // 621 //! \brief Enables animation on the LCD_F controller 622 //! 623 //! This function turns on animation for the LCD_F controller. 624 //! 625 //! \return None 626 // 627 //***************************************************************************** 628 extern void LCD_F_enableAnimation(void); 629 630 631 //***************************************************************************** 632 // 633 //! \brief Enables animation on the LCD_F controller 634 //! 635 //! This function turns on animation for the LCD_F controller. 636 //! 637 //! \return None 638 // 639 //***************************************************************************** 640 extern void LCD_F_disableAnimation(void); 641 642 //***************************************************************************** 643 // 644 //! \brief Clears all LCD_F animation memory registers. 645 //! 646 //! This function clears all LCD_F animation memory registers. 647 //! 648 //! \return None 649 // 650 //***************************************************************************** 651 extern void LCD_F_clearAllAnimationMemory(void); 652 653 //***************************************************************************** 654 // 655 //! \brief Sets the LCD_F pins as LCD function pin. 656 //! 657 //! This function sets the LCD_F pins as LCD function pin. 658 //! 659 //! \param pin is the select pin set as LCD function. 660 //! Valid values are: 661 //! - \b LCD_F_SEGMENT_LINE_0 662 //! - \b LCD_F_SEGMENT_LINE_1 663 //! - \b LCD_F_SEGMENT_LINE_2 664 //! - \b LCD_F_SEGMENT_LINE_3 665 //! - \b LCD_F_SEGMENT_LINE_4 666 //! - \b LCD_F_SEGMENT_LINE_5 667 //! - \b LCD_F_SEGMENT_LINE_6 668 //! - \b LCD_F_SEGMENT_LINE_7 669 //! - \b LCD_F_SEGMENT_LINE_8 670 //! - \b LCD_F_SEGMENT_LINE_9 671 //! - \b LCD_F_SEGMENT_LINE_10 672 //! - \b LCD_F_SEGMENT_LINE_11 673 //! - \b LCD_F_SEGMENT_LINE_12 674 //! - \b LCD_F_SEGMENT_LINE_13 675 //! - \b LCD_F_SEGMENT_LINE_14 676 //! - \b LCD_F_SEGMENT_LINE_15 677 //! - \b LCD_F_SEGMENT_LINE_16 678 //! - \b LCD_F_SEGMENT_LINE_17 679 //! - \b LCD_F_SEGMENT_LINE_18 680 //! - \b LCD_F_SEGMENT_LINE_19 681 //! - \b LCD_F_SEGMENT_LINE_20 682 //! - \b LCD_F_SEGMENT_LINE_21 683 //! - \b LCD_F_SEGMENT_LINE_22 684 //! - \b LCD_F_SEGMENT_LINE_23 685 //! - \b LCD_F_SEGMENT_LINE_24 686 //! - \b LCD_F_SEGMENT_LINE_25 687 //! - \b LCD_F_SEGMENT_LINE_26 688 //! - \b LCD_F_SEGMENT_LINE_27 689 //! - \b LCD_F_SEGMENT_LINE_28 690 //! - \b LCD_F_SEGMENT_LINE_29 691 //! - \b LCD_F_SEGMENT_LINE_30 692 //! - \b LCD_F_SEGMENT_LINE_31 693 //! - \b LCD_F_SEGMENT_LINE_32 694 //! - \b LCD_F_SEGMENT_LINE_33 695 //! - \b LCD_F_SEGMENT_LINE_34 696 //! - \b LCD_F_SEGMENT_LINE_35 697 //! - \b LCD_F_SEGMENT_LINE_36 698 //! - \b LCD_F_SEGMENT_LINE_37 699 //! - \b LCD_F_SEGMENT_LINE_38 700 //! - \b LCD_F_SEGMENT_LINE_39 701 //! - \b LCD_F_SEGMENT_LINE_40 702 //! - \b LCD_F_SEGMENT_LINE_41 703 //! - \b LCD_F_SEGMENT_LINE_42 704 //! - \b LCD_F_SEGMENT_LINE_43 705 //! - \b LCD_F_SEGMENT_LINE_44 706 //! - \b LCD_F_SEGMENT_LINE_45 707 //! - \b LCD_F_SEGMENT_LINE_46 708 //! - \b LCD_F_SEGMENT_LINE_47 709 //! 710 //! \return None 711 // 712 //***************************************************************************** 713 extern void LCD_F_setPinAsLCDFunction(uint_fast8_t pin); 714 715 //***************************************************************************** 716 // 717 //! \brief Sets the LCD_F pins as port function pin. 718 //! 719 //! \param baseAddress is the base address of the LCD_F module. 720 //! \param pin is the select pin set as Port function. 721 //! Valid values are: 722 //! - \b LCD_F_SEGMENT_LINE_0 723 //! - \b LCD_F_SEGMENT_LINE_1 724 //! - \b LCD_F_SEGMENT_LINE_2 725 //! - \b LCD_F_SEGMENT_LINE_3 726 //! - \b LCD_F_SEGMENT_LINE_4 727 //! - \b LCD_F_SEGMENT_LINE_5 728 //! - \b LCD_F_SEGMENT_LINE_6 729 //! - \b LCD_F_SEGMENT_LINE_7 730 //! - \b LCD_F_SEGMENT_LINE_8 731 //! - \b LCD_F_SEGMENT_LINE_9 732 //! - \b LCD_F_SEGMENT_LINE_10 733 //! - \b LCD_F_SEGMENT_LINE_11 734 //! - \b LCD_F_SEGMENT_LINE_12 735 //! - \b LCD_F_SEGMENT_LINE_13 736 //! - \b LCD_F_SEGMENT_LINE_14 737 //! - \b LCD_F_SEGMENT_LINE_15 738 //! - \b LCD_F_SEGMENT_LINE_16 739 //! - \b LCD_F_SEGMENT_LINE_17 740 //! - \b LCD_F_SEGMENT_LINE_18 741 //! - \b LCD_F_SEGMENT_LINE_19 742 //! - \b LCD_F_SEGMENT_LINE_20 743 //! - \b LCD_F_SEGMENT_LINE_21 744 //! - \b LCD_F_SEGMENT_LINE_22 745 //! - \b LCD_F_SEGMENT_LINE_23 746 //! - \b LCD_F_SEGMENT_LINE_24 747 //! - \b LCD_F_SEGMENT_LINE_25 748 //! - \b LCD_F_SEGMENT_LINE_26 749 //! - \b LCD_F_SEGMENT_LINE_27 750 //! - \b LCD_F_SEGMENT_LINE_28 751 //! - \b LCD_F_SEGMENT_LINE_29 752 //! - \b LCD_F_SEGMENT_LINE_30 753 //! - \b LCD_F_SEGMENT_LINE_31 754 //! - \b LCD_F_SEGMENT_LINE_32 755 //! - \b LCD_F_SEGMENT_LINE_33 756 //! - \b LCD_F_SEGMENT_LINE_34 757 //! - \b LCD_F_SEGMENT_LINE_35 758 //! - \b LCD_F_SEGMENT_LINE_36 759 //! - \b LCD_F_SEGMENT_LINE_37 760 //! - \b LCD_F_SEGMENT_LINE_38 761 //! - \b LCD_F_SEGMENT_LINE_39 762 //! - \b LCD_F_SEGMENT_LINE_40 763 //! - \b LCD_F_SEGMENT_LINE_41 764 //! - \b LCD_F_SEGMENT_LINE_42 765 //! - \b LCD_F_SEGMENT_LINE_43 766 //! - \b LCD_F_SEGMENT_LINE_44 767 //! - \b LCD_F_SEGMENT_LINE_45 768 //! - \b LCD_F_SEGMENT_LINE_46 769 //! - \b LCD_F_SEGMENT_LINE_47 770 //! 771 //! \return None 772 // 773 //***************************************************************************** 774 extern void LCD_F_setPinAsPortFunction(uint_fast8_t pin); 775 776 //***************************************************************************** 777 // 778 //! \brief Sets the LCD_F pins as LCD function pin. 779 //! 780 //! This function sets the LCD_F pins as LCD function pin. Instead of passing 781 //! the all the possible pins, it just requires the start pin and the end pin. 782 //! 783 //! \param startPin is the starting pin to be configured as LCD function pin. 784 //! Valid values are: 785 //! - \b LCD_F_SEGMENT_LINE_0 786 //! - \b LCD_F_SEGMENT_LINE_1 787 //! - \b LCD_F_SEGMENT_LINE_2 788 //! - \b LCD_F_SEGMENT_LINE_3 789 //! - \b LCD_F_SEGMENT_LINE_4 790 //! - \b LCD_F_SEGMENT_LINE_5 791 //! - \b LCD_F_SEGMENT_LINE_6 792 //! - \b LCD_F_SEGMENT_LINE_7 793 //! - \b LCD_F_SEGMENT_LINE_8 794 //! - \b LCD_F_SEGMENT_LINE_9 795 //! - \b LCD_F_SEGMENT_LINE_10 796 //! - \b LCD_F_SEGMENT_LINE_11 797 //! - \b LCD_F_SEGMENT_LINE_12 798 //! - \b LCD_F_SEGMENT_LINE_13 799 //! - \b LCD_F_SEGMENT_LINE_14 800 //! - \b LCD_F_SEGMENT_LINE_15 801 //! - \b LCD_F_SEGMENT_LINE_16 802 //! - \b LCD_F_SEGMENT_LINE_17 803 //! - \b LCD_F_SEGMENT_LINE_18 804 //! - \b LCD_F_SEGMENT_LINE_19 805 //! - \b LCD_F_SEGMENT_LINE_20 806 //! - \b LCD_F_SEGMENT_LINE_21 807 //! - \b LCD_F_SEGMENT_LINE_22 808 //! - \b LCD_F_SEGMENT_LINE_23 809 //! - \b LCD_F_SEGMENT_LINE_24 810 //! - \b LCD_F_SEGMENT_LINE_25 811 //! - \b LCD_F_SEGMENT_LINE_26 812 //! - \b LCD_F_SEGMENT_LINE_27 813 //! - \b LCD_F_SEGMENT_LINE_28 814 //! - \b LCD_F_SEGMENT_LINE_29 815 //! - \b LCD_F_SEGMENT_LINE_30 816 //! - \b LCD_F_SEGMENT_LINE_31 817 //! - \b LCD_F_SEGMENT_LINE_32 818 //! - \b LCD_F_SEGMENT_LINE_33 819 //! - \b LCD_F_SEGMENT_LINE_34 820 //! - \b LCD_F_SEGMENT_LINE_35 821 //! - \b LCD_F_SEGMENT_LINE_36 822 //! - \b LCD_F_SEGMENT_LINE_37 823 //! - \b LCD_F_SEGMENT_LINE_38 824 //! - \b LCD_F_SEGMENT_LINE_39 825 //! - \b LCD_F_SEGMENT_LINE_40 826 //! - \b LCD_F_SEGMENT_LINE_41 827 //! - \b LCD_F_SEGMENT_LINE_42 828 //! - \b LCD_F_SEGMENT_LINE_43 829 //! - \b LCD_F_SEGMENT_LINE_44 830 //! - \b LCD_F_SEGMENT_LINE_45 831 //! - \b LCD_F_SEGMENT_LINE_46 832 //! - \b LCD_F_SEGMENT_LINE_47 833 //! \param endPin is the ending pin to be configured as LCD function pin. 834 //! Valid values are: 835 //! - \b LCD_F_SEGMENT_LINE_0 836 //! - \b LCD_F_SEGMENT_LINE_1 837 //! - \b LCD_F_SEGMENT_LINE_2 838 //! - \b LCD_F_SEGMENT_LINE_3 839 //! - \b LCD_F_SEGMENT_LINE_4 840 //! - \b LCD_F_SEGMENT_LINE_5 841 //! - \b LCD_F_SEGMENT_LINE_6 842 //! - \b LCD_F_SEGMENT_LINE_7 843 //! - \b LCD_F_SEGMENT_LINE_8 844 //! - \b LCD_F_SEGMENT_LINE_9 845 //! - \b LCD_F_SEGMENT_LINE_10 846 //! - \b LCD_F_SEGMENT_LINE_11 847 //! - \b LCD_F_SEGMENT_LINE_12 848 //! - \b LCD_F_SEGMENT_LINE_13 849 //! - \b LCD_F_SEGMENT_LINE_14 850 //! - \b LCD_F_SEGMENT_LINE_15 851 //! - \b LCD_F_SEGMENT_LINE_16 852 //! - \b LCD_F_SEGMENT_LINE_17 853 //! - \b LCD_F_SEGMENT_LINE_18 854 //! - \b LCD_F_SEGMENT_LINE_19 855 //! - \b LCD_F_SEGMENT_LINE_20 856 //! - \b LCD_F_SEGMENT_LINE_21 857 //! - \b LCD_F_SEGMENT_LINE_22 858 //! - \b LCD_F_SEGMENT_LINE_23 859 //! - \b LCD_F_SEGMENT_LINE_24 860 //! - \b LCD_F_SEGMENT_LINE_25 861 //! - \b LCD_F_SEGMENT_LINE_26 862 //! - \b LCD_F_SEGMENT_LINE_27 863 //! - \b LCD_F_SEGMENT_LINE_28 864 //! - \b LCD_F_SEGMENT_LINE_29 865 //! - \b LCD_F_SEGMENT_LINE_30 866 //! - \b LCD_F_SEGMENT_LINE_31 867 //! - \b LCD_F_SEGMENT_LINE_32 868 //! - \b LCD_F_SEGMENT_LINE_33 869 //! - \b LCD_F_SEGMENT_LINE_34 870 //! - \b LCD_F_SEGMENT_LINE_35 871 //! - \b LCD_F_SEGMENT_LINE_36 872 //! - \b LCD_F_SEGMENT_LINE_37 873 //! - \b LCD_F_SEGMENT_LINE_38 874 //! - \b LCD_F_SEGMENT_LINE_39 875 //! - \b LCD_F_SEGMENT_LINE_40 876 //! - \b LCD_F_SEGMENT_LINE_41 877 //! - \b LCD_F_SEGMENT_LINE_42 878 //! - \b LCD_F_SEGMENT_LINE_43 879 //! - \b LCD_F_SEGMENT_LINE_44 880 //! - \b LCD_F_SEGMENT_LINE_45 881 //! - \b LCD_F_SEGMENT_LINE_46 882 //! - \b LCD_F_SEGMENT_LINE_47 883 //! 884 //! \return None 885 // 886 //***************************************************************************** 887 extern void LCD_F_setPinsAsLCDFunction(uint_fast8_t startPin, uint8_t endPin); 888 889 //***************************************************************************** 890 // 891 //! \brief Sets the LCD_F pin as a common line. 892 //! 893 //! This function sets the LCD_F pin as a common line and assigns the 894 //! corresponding memory pin to a specific COM line. 895 //! 896 //! \param pin is the selected pin to be configured as common line. 897 //! Valid values are: 898 //! - \b LCD_F_SEGMENT_LINE_0 899 //! - \b LCD_F_SEGMENT_LINE_1 900 //! - \b LCD_F_SEGMENT_LINE_2 901 //! - \b LCD_F_SEGMENT_LINE_3 902 //! - \b LCD_F_SEGMENT_LINE_4 903 //! - \b LCD_F_SEGMENT_LINE_5 904 //! - \b LCD_F_SEGMENT_LINE_6 905 //! - \b LCD_F_SEGMENT_LINE_7 906 //! - \b LCD_F_SEGMENT_LINE_8 907 //! - \b LCD_F_SEGMENT_LINE_9 908 //! - \b LCD_F_SEGMENT_LINE_10 909 //! - \b LCD_F_SEGMENT_LINE_11 910 //! - \b LCD_F_SEGMENT_LINE_12 911 //! - \b LCD_F_SEGMENT_LINE_13 912 //! - \b LCD_F_SEGMENT_LINE_14 913 //! - \b LCD_F_SEGMENT_LINE_15 914 //! - \b LCD_F_SEGMENT_LINE_16 915 //! - \b LCD_F_SEGMENT_LINE_17 916 //! - \b LCD_F_SEGMENT_LINE_18 917 //! - \b LCD_F_SEGMENT_LINE_19 918 //! - \b LCD_F_SEGMENT_LINE_20 919 //! - \b LCD_F_SEGMENT_LINE_21 920 //! - \b LCD_F_SEGMENT_LINE_22 921 //! - \b LCD_F_SEGMENT_LINE_23 922 //! - \b LCD_F_SEGMENT_LINE_24 923 //! - \b LCD_F_SEGMENT_LINE_25 924 //! - \b LCD_F_SEGMENT_LINE_26 925 //! - \b LCD_F_SEGMENT_LINE_27 926 //! - \b LCD_F_SEGMENT_LINE_28 927 //! - \b LCD_F_SEGMENT_LINE_29 928 //! - \b LCD_F_SEGMENT_LINE_30 929 //! - \b LCD_F_SEGMENT_LINE_31 930 //! - \b LCD_F_SEGMENT_LINE_32 931 //! - \b LCD_F_SEGMENT_LINE_33 932 //! - \b LCD_F_SEGMENT_LINE_34 933 //! - \b LCD_F_SEGMENT_LINE_35 934 //! - \b LCD_F_SEGMENT_LINE_36 935 //! - \b LCD_F_SEGMENT_LINE_37 936 //! - \b LCD_F_SEGMENT_LINE_38 937 //! - \b LCD_F_SEGMENT_LINE_39 938 //! - \b LCD_F_SEGMENT_LINE_40 939 //! - \b LCD_F_SEGMENT_LINE_41 940 //! - \b LCD_F_SEGMENT_LINE_42 941 //! - \b LCD_F_SEGMENT_LINE_43 942 //! - \b LCD_F_SEGMENT_LINE_44 943 //! - \b LCD_F_SEGMENT_LINE_45 944 //! - \b LCD_F_SEGMENT_LINE_46 945 //! - \b LCD_F_SEGMENT_LINE_47 946 //! \param com is the selected COM number for the common line. 947 //! Valid values are: 948 //! - \b LCD_F_MEMORY_COM0 949 //! - \b LCD_F_MEMORY_COM1 950 //! - \b LCD_F_MEMORY_COM2 951 //! - \b LCD_F_MEMORY_COM3 952 //! - \b LCD_F_MEMORY_COM4 - only for 5-Mux/6-Mux/7-Mux/8-Mux 953 //! - \b LCD_F_MEMORY_COM5 - only for 5-Mux/6-Mux/7-Mux/8-Mux 954 //! - \b LCD_F_MEMORY_COM6 - only for 5-Mux/6-Mux/7-Mux/8-Mux 955 //! - \b LCD_F_MEMORY_COM7 - only for 5-Mux/6-Mux/7-Mux/8-Mux 956 //! 957 //! \return None 958 // 959 //***************************************************************************** 960 extern void LCD_F_setPinAsCOM(uint8_t pin, uint_fast8_t com); 961 962 //***************************************************************************** 963 // 964 //! \brief Sets the LCD_F pin as a segment line. 965 //! 966 //! This function sets the LCD_F pin as segment line. 967 //! 968 //! \param pin is the selected pin to be configed as segment line. 969 //! Valid values are: 970 //! - \b LCD_F_SEGMENT_LINE_0 971 //! - \b LCD_F_SEGMENT_LINE_1 972 //! - \b LCD_F_SEGMENT_LINE_2 973 //! - \b LCD_F_SEGMENT_LINE_3 974 //! - \b LCD_F_SEGMENT_LINE_4 975 //! - \b LCD_F_SEGMENT_LINE_5 976 //! - \b LCD_F_SEGMENT_LINE_6 977 //! - \b LCD_F_SEGMENT_LINE_7 978 //! - \b LCD_F_SEGMENT_LINE_8 979 //! - \b LCD_F_SEGMENT_LINE_9 980 //! - \b LCD_F_SEGMENT_LINE_10 981 //! - \b LCD_F_SEGMENT_LINE_11 982 //! - \b LCD_F_SEGMENT_LINE_12 983 //! - \b LCD_F_SEGMENT_LINE_13 984 //! - \b LCD_F_SEGMENT_LINE_14 985 //! - \b LCD_F_SEGMENT_LINE_15 986 //! - \b LCD_F_SEGMENT_LINE_16 987 //! - \b LCD_F_SEGMENT_LINE_17 988 //! - \b LCD_F_SEGMENT_LINE_18 989 //! - \b LCD_F_SEGMENT_LINE_19 990 //! - \b LCD_F_SEGMENT_LINE_20 991 //! - \b LCD_F_SEGMENT_LINE_21 992 //! - \b LCD_F_SEGMENT_LINE_22 993 //! - \b LCD_F_SEGMENT_LINE_23 994 //! - \b LCD_F_SEGMENT_LINE_24 995 //! - \b LCD_F_SEGMENT_LINE_25 996 //! - \b LCD_F_SEGMENT_LINE_26 997 //! - \b LCD_F_SEGMENT_LINE_27 998 //! - \b LCD_F_SEGMENT_LINE_28 999 //! - \b LCD_F_SEGMENT_LINE_29 1000 //! - \b LCD_F_SEGMENT_LINE_30 1001 //! - \b LCD_F_SEGMENT_LINE_31 1002 //! - \b LCD_F_SEGMENT_LINE_32 1003 //! - \b LCD_F_SEGMENT_LINE_33 1004 //! - \b LCD_F_SEGMENT_LINE_34 1005 //! - \b LCD_F_SEGMENT_LINE_35 1006 //! - \b LCD_F_SEGMENT_LINE_36 1007 //! - \b LCD_F_SEGMENT_LINE_37 1008 //! - \b LCD_F_SEGMENT_LINE_38 1009 //! - \b LCD_F_SEGMENT_LINE_39 1010 //! - \b LCD_F_SEGMENT_LINE_40 1011 //! - \b LCD_F_SEGMENT_LINE_41 1012 //! - \b LCD_F_SEGMENT_LINE_42 1013 //! - \b LCD_F_SEGMENT_LINE_43 1014 //! - \b LCD_F_SEGMENT_LINE_44 1015 //! - \b LCD_F_SEGMENT_LINE_45 1016 //! - \b LCD_F_SEGMENT_LINE_46 1017 //! - \b LCD_F_SEGMENT_LINE_47 1018 //! 1019 //! \return None 1020 // 1021 //***************************************************************************** 1022 extern void LCD_F_setPinAsSEG(uint_fast8_t pin); 1023 1024 //***************************************************************************** 1025 // 1026 //! \brief Selects the bias level. 1027 //! 1028 //! \param bias is the select for bias level. 1029 //! Valid values are: 1030 //! - \b LCD_F_BIAS_1_3 [Default] - 1/3 bias 1031 //! - \b LCD_F_BIAS_1_4 - 1/4 bias 1032 //! - \b LCD_F_BIAS_1_2 - 1/2 bias 1033 //! 1034 //! \note Quarter (1/4) BIAS mode is only available in 5-mux to 8-mux. In 1035 //! 2-mux to 4-mux modes, this value will result in a third BIAS (1/3) 1036 //! 1037 //! \return None 1038 // 1039 //***************************************************************************** 1040 extern void LCD_F_selectBias(uint_fast16_t bias); 1041 1042 //***************************************************************************** 1043 // 1044 //! \brief Sets the voltage source for V2/V3/V4 and V5. 1045 //! 1046 //! \param v2v3v4Source is the V2/V3/V4 source select. 1047 //! Valid values are: 1048 //! - \b LCD_F_V2V3V4_GENERATED_INTERNALLY_NOT_SWITCHED_TO_PINS 1049 //! [Default] 1050 //! - \b LCD_F_V2V3V4_GENERATED_INTERNALLY_SWITCHED_TO_PINS 1051 //! - \b LCD_F_V2V3V4_SOURCED_EXTERNALLY 1052 //! \param v5Source is the V5 source select. 1053 //! Valid values are: 1054 //! - \b LCD_F_V5_VSS [Default] 1055 //! - \b LCD_F_V5_SOURCED_FROM_R03 1056 //! 1057 //! \return None 1058 // 1059 //***************************************************************************** 1060 extern void LCD_F_setVLCDSource(uint_fast16_t v2v3v4Source, 1061 uint_fast16_t v5Source); 1062 1063 //***************************************************************************** 1064 // 1065 //! \brief Clears the LCD_F selected interrupt flags. 1066 //! 1067 //! This function clears the specified interrupt flags. 1068 //! 1069 //! \param mask is the masked interrupt flag to be cleared. 1070 //! Mask value is the logical OR of any of the following: 1071 //! - \b LCD_F_BLINKING_SEGMENTS_ON_INTERRUPT 1072 //! - \b LCD_F_BLINKING_SEGMENTS_OFF_INTERRUPT 1073 //! - \b LCD_F_FRAME_INTERRUPT 1074 //! - \b LCD_F_ANIMATION_LOOP_INTERRUPT 1075 //! - \b LCD_F_ANIMATION_STEP_INTERRUPT 1076 //! 1077 //! \return None 1078 // 1079 //***************************************************************************** 1080 extern void LCD_F_clearInterrupt(uint32_t mask); 1081 1082 //***************************************************************************** 1083 // 1084 //! \brief Returns the status of the selected interrupt flags. 1085 //! 1086 //! This function returns the status of the selected interrupt flags. 1087 //! 1088 //! \return The current interrupt flag status. Can be a logical OR of: 1089 //! - \b LCD_F_BLINKING_SEGMENTS_ON_INTERRUPT 1090 //! - \b LCD_F_BLINKING_SEGMENTS_OFF_INTERRUPT 1091 //! - \b LCD_F_FRAME_INTERRUPT 1092 //! - \b LCD_F_ANIMATION_LOOP_INTERRUPT 1093 //! - \b LCD_F_ANIMATION_STEP_INTERRUPT 1094 // 1095 //***************************************************************************** 1096 extern uint32_t LCD_F_getInterruptStatus(void); 1097 1098 //***************************************************************************** 1099 // 1100 //! \brief Returns the status of the selected interrupt flags masked with the 1101 //! currently enabled interrupts. 1102 //! 1103 //! \return The current interrupt flag status. Can be a logical OR of: 1104 //! - \b LCD_F_BLINKING_SEGMENTS_ON_INTERRUPT 1105 //! - \b LCD_F_BLINKING_SEGMENTS_OFF_INTERRUPT 1106 //! - \b LCD_F_FRAME_INTERRUPT 1107 //! - \b LCD_F_ANIMATION_LOOP_INTERRUPT 1108 //! - \b LCD_F_ANIMATION_STEP_INTERRUPT 1109 // 1110 //***************************************************************************** 1111 extern uint32_t LCD_F_getEnabledInterruptStatus(void); 1112 1113 //***************************************************************************** 1114 // 1115 //! \brief Enables the LCD_F selected interrupts 1116 //! 1117 //! This function enables the specified interrupts 1118 //! 1119 //! \param mask is the variable containing interrupt flags to be enabled. 1120 //! Mask value is the logical OR of any of the following: 1121 //! - \b LCD_F_BLINKING_SEGMENTS_ON_INTERRUPT 1122 //! - \b LCD_F_BLINKING_SEGMENTS_OFF_INTERRUPT 1123 //! - \b LCD_F_FRAME_INTERRUPT 1124 //! - \b LCD_F_ANIMATION_LOOP_INTERRUPT 1125 //! - \b LCD_F_ANIMATION_STEP_INTERRUPT 1126 //! 1127 //! \return None 1128 // 1129 //***************************************************************************** 1130 extern void LCD_F_enableInterrupt(uint32_t mask); 1131 1132 //***************************************************************************** 1133 // 1134 //! \brief Disables the LCD_F selected interrupts. 1135 //! 1136 //! This function disables the specified interrupts. 1137 //! 1138 //! \param mask is the variable containing interrupt flags to be disabled 1139 //! Mask value is the logical OR of any of the following: 1140 //! - \b LCD_F_BLINKING_SEGMENTS_ON_INTERRUPT 1141 //! - \b LCD_F_BLINKING_SEGMENTS_OFF_INTERRUPT 1142 //! - \b LCD_F_FRAME_INTERRUPT 1143 //! - \b LCD_F_ANIMATION_LOOP_INTERRUPT 1144 //! - \b LCD_F_ANIMATION_STEP_INTERRUPT 1145 //! 1146 //! \return None 1147 // 1148 //***************************************************************************** 1149 extern void LCD_F_disableInterrupt(uint32_t mask); 1150 1151 //***************************************************************************** 1152 // 1153 //! Registers an interrupt handler for LCD_F interrupt. 1154 //! 1155 //! \param intHandler is a pointer to the function to be called when the 1156 //! LCD_F interrupt occurs. 1157 //! 1158 //! This function registers the handler to be called when a LCD_F 1159 //! interrupt occurs. This function enables the global interrupt in the 1160 //! interrupt controller; specific LCD_F interrupts must be enabled 1161 //! via LCD_F_enableInterrupt(). It is the interrupt handler's responsibility 1162 //! to clear the interrupt source through LCD_F_clearInterruptFlag(). 1163 //! 1164 //! \return None. 1165 // 1166 //***************************************************************************** 1167 extern void LCD_F_registerInterrupt(void (*intHandler)(void)); 1168 1169 //***************************************************************************** 1170 // 1171 //! Unregisters the interrupt handler for the LCD_F interrupt 1172 //! 1173 //! This function unregisters the handler to be called when LCD_F 1174 //! interrupt occurs. This function also masks off the interrupt in the 1175 //! interrupt controller so that the interrupt handler no longer is called. 1176 //! 1177 //! \sa Interrupt_registerInterrupt() for important information about 1178 //! registering interrupt handlers. 1179 //! 1180 //! \return None. 1181 // 1182 //***************************************************************************** 1183 extern void LCD_F_unregisterInterrupt(void); 1184 1185 //***************************************************************************** 1186 // 1187 // Mark the end of the C bindings section for C++ compilers. 1188 // 1189 //***************************************************************************** 1190 #ifdef __cplusplus 1191 } 1192 #endif 1193 1194 //***************************************************************************** 1195 // 1196 // Close the Doxygen group. 1197 //! @} 1198 // 1199 //***************************************************************************** 1200 1201 #endif /* __MCU_HAS_LCD_F__ */ 1202 1203 #endif /* LCD_F_H_ */ 1204