diff --git a/src/example/decode_example/CC26xx/IAR.tar.bz2 b/src/example/decode_example/CC26xx/IAR.tar.bz2 deleted file mode 100644 index 7d09fb5..0000000 Binary files a/src/example/decode_example/CC26xx/IAR.tar.bz2 and /dev/null differ diff --git a/src/example/decode_example/CC26xx/IAR.zip b/src/example/decode_example/CC26xx/IAR.zip new file mode 100644 index 0000000..cb55ce6 Binary files /dev/null and b/src/example/decode_example/CC26xx/IAR.zip differ diff --git a/src/example/decode_example/CC26xx/Source/Application/Board/board_lcd.c.pre b/src/example/decode_example/CC26xx/Source/Application/Board/board_lcd.c.pre deleted file mode 100644 index 73bb69e..0000000 --- a/src/example/decode_example/CC26xx/Source/Application/Board/board_lcd.c.pre +++ /dev/null @@ -1,1035 +0,0 @@ -/******************************************************************************* - Filename: board_lcd.c - Revised: $Date: 2014-03-10 07:29:12 -0700 (Mon, 10 Mar 2014) $ - Revision: $Revision: 37597 $ - - Description: This file contains the interface to the SRF06EB LCD Service. - - Copyright 2014 Texas Instruments Incorporated. All rights reserved. - - IMPORTANT: Your use of this Software is limited to those specific rights - granted under the terms of a software license agreement between the user - who downloaded the software, his/her employer (which must be your employer) - and Texas Instruments Incorporated (the "License"). You may not use this - Software unless you agree to abide by the terms of the License. The License - limits your use, and you acknowledge, that the Software may not be modified, - copied or distributed unless embedded on a Texas Instruments microcontroller - or used solely and exclusively in conjunction with a Texas Instruments radio - frequency transceiver, which is integrated into your product. Other than for - the foregoing purpose, you may not use, reproduce, copy, prepare derivative - works of, modify, distribute, perform, display or sell this Software and/or - its documentation for any purpose. - - YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE - PROVIDED 揂S IS?WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, - INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, - NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL - TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, - NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER - LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES - INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE - OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT - OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES - (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. - - Should you have any questions regarding your right to use this Software, - contact Texas Instruments Incorporated at www.TI.com. -*******************************************************************************/ - -/********************************************************************* - * INCLUDES - */ -#include -#include -#include -#include -#include - -#include "board_lcd.h" -#include "board_uart.h" -#include "Board.h" - -/********************************************************************* - * TYPEDEFS - */ - -/********************************************************************* - * LOCAL FUNCTIONS - */ - -/******************************************************************************* - * EXTERNAL VARIABLES - */ - -/********************************************************************* - * LOCAL VARIABLES - */ - -/********************************************************************* - * PUBLIC FUNCTIONS - */ - - -#define HW_VER1_2 12 -#define HW_VER2_0 13 -#define HW_VER HW_VER2_0 - -#if 0 -#define uint8 unsigned char -#define uint16 unsigned short -#define uint32 unsigned int -#endif - -#define TI_DRIVERS_LCD - -#ifdef TI_DRIVERS_LCD -#include "stdio.h" -#include "string.h" - - - -#include "util.h" -#include "Board.h" - -#ifdef NPI_USE_UART -#include "Board_uart.h" -#endif - - -#define LCD_SCL GPIO_PIN_9 -#define LCD_SDA GPIO_PIN_10 -#define LCD_RST GPIO_PIN_4 - -#if(HW_VER == HW_VER1_2 ) -#define LCD_DC GPIO_PIN_5 -#elif (HW_VER == HW_VER2_0) -#define LCD_DC GPIO_PIN_26 -#endif - -#define X_WIDTH 128 -#define Y_WIDTH 64 - - -/* LCD lines */ -#define LCD_MAX_LINE_COUNT 8 -#define LCD_MAX_LINE_LENGTH 21 -#define LCD_MAX_BUF 25 - - -#define HAL_LCD_MAX_CHARS 16 -#define HAL_LCD_MAX_BUFF 25 - - - -#define LCD_SUPPORT -#define HAL_LCD TRUE - -static uint8 Lcd_Line1[HAL_LCD_MAX_CHARS+1]; - - -#ifdef LCD_SUPPORT - -const unsigned char F16x16[] = { - -}; - -static const unsigned char F8X16[]= { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 0 - 0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1 - 0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2 - 0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3 - 0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4 - 0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5 - 0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6 - 0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7 - 0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8 - 0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9 - 0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10 - 0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11 - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12 - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13 - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14 - 0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15 - 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16 - 0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17 - 0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18 - 0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19 - 0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20 - 0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21 - 0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22 - 0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23 - 0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24 - 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25 - 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26 - 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27 - 0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28 - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29 - 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30 - 0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31 - 0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32 - 0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33 - 0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34 - 0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35 - 0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36 - 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37 - 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38 - 0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39 - 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40 - 0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41 - 0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42 - 0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43 - 0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44 - 0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45 - 0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46 - 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47 - 0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48 - 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49 - 0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50 - 0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51 - 0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52 - 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53 - 0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54 - 0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55 - 0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56 - 0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57 - 0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58 - 0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59 - 0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60 - 0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61 - 0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62 - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63 - 0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64 - 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65 - 0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66 - 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67 - 0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68 - 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69 - 0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70 - 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71 - 0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72 - 0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73 - 0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74 - 0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75 - 0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76 - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77 - 0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78 - 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79 - 0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80 - 0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81 - 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82 - 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83 - 0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84 - 0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85 - 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86 - 0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87 - 0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88 - 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89 - 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90 - 0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91 - 0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92 - 0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93 - 0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94 -}; -#endif - -static const unsigned char F6x8[92][6] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp - 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// ! - 0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// " - 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14,// # - 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12,// $ - 0x00, 0x62, 0x64, 0x08, 0x13, 0x23,// % - 0x00, 0x36, 0x49, 0x55, 0x22, 0x50,// & - 0x00, 0x00, 0x05, 0x03, 0x00, 0x00,// ' - 0x00, 0x00, 0x1c, 0x22, 0x41, 0x00,// ( - 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00,// ) - 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14,// * - 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08,// + - 0x00, 0x00, 0x00, 0xA0, 0x60, 0x00,// , - 0x00, 0x08, 0x08, 0x08, 0x08, 0x08,// - - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,// . - 0x00, 0x20, 0x10, 0x08, 0x04, 0x02,// / - 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E,// 0 - 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00,// 1 - 0x00, 0x42, 0x61, 0x51, 0x49, 0x46,// 2 - 0x00, 0x21, 0x41, 0x45, 0x4B, 0x31,// 3 - 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10,// 4 - 0x00, 0x27, 0x45, 0x45, 0x45, 0x39,// 5 - 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30,// 6 - 0x00, 0x01, 0x71, 0x09, 0x05, 0x03,// 7 - 0x00, 0x36, 0x49, 0x49, 0x49, 0x36,// 8 - 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E,// 9 - 0x00, 0x00, 0x36, 0x36, 0x00, 0x00,// : - 0x00, 0x00, 0x56, 0x36, 0x00, 0x00,// ; - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,// < - 0x00, 0x14, 0x14, 0x14, 0x14, 0x14,// = - 0x00, 0x00, 0x41, 0x22, 0x14, 0x08,// > - 0x00, 0x02, 0x01, 0x51, 0x09, 0x06,// ? - 0x00, 0x32, 0x49, 0x59, 0x51, 0x3E,// @ - 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C,// A - 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36,// B - 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22,// C - 0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C,// D - 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41,// E - 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01,// F - 0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A,// G - 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F,// H - 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00,// I - 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01,// J - 0x00, 0x7F, 0x08, 0x14, 0x22, 0x41,// K - 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40,// L - 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F,// M - 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F,// N - 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E,// O - 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06,// P - 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E,// Q - 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46,// R - 0x00, 0x46, 0x49, 0x49, 0x49, 0x31,// S - 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01,// T - 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F,// U - 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F,// V - 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F,// W - 0x00, 0x63, 0x14, 0x08, 0x14, 0x63,// X - 0x00, 0x07, 0x08, 0x70, 0x08, 0x07,// Y - 0x00, 0x61, 0x51, 0x49, 0x45, 0x43,// Z - 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00,// [ - 0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55,// 55 - 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00,// ] - 0x00, 0x04, 0x02, 0x01, 0x02, 0x04,// ^ - 0x00, 0x40, 0x40, 0x40, 0x40, 0x40,// _ - 0x00, 0x00, 0x01, 0x02, 0x04, 0x00,// ' - 0x00, 0x20, 0x54, 0x54, 0x54, 0x78,// a - 0x00, 0x7F, 0x48, 0x44, 0x44, 0x38,// b - 0x00, 0x38, 0x44, 0x44, 0x44, 0x20,// c - 0x00, 0x38, 0x44, 0x44, 0x48, 0x7F,// d - 0x00, 0x38, 0x54, 0x54, 0x54, 0x18,// e - 0x00, 0x08, 0x7E, 0x09, 0x01, 0x02,// f - 0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C,// g - 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78,// h - 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00,// i - 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00,// j - 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00,// k - 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00,// l - 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78,// m - 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78,// n - 0x00, 0x38, 0x44, 0x44, 0x44, 0x38,// o - 0x00, 0xFC, 0x24, 0x24, 0x24, 0x18,// p - 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC,// q - 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08,// r - 0x00, 0x48, 0x54, 0x54, 0x54, 0x20,// s - 0x00, 0x04, 0x3F, 0x44, 0x40, 0x20,// t - 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C,// u - 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C,// v - 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C,// w - 0x00, 0x44, 0x28, 0x10, 0x28, 0x44,// x - 0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C,// y - 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44,// z - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,// horiz lines -}; - -#if 1 -unsigned char BMP[] = { - -}; -#endif -void Draw_BMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]); - -static void _itoa(unsigned int uiNum, unsigned char *buf, unsigned char uiRadix) -{ - unsigned char c, i; - unsigned char *p, rst[32]; - - p = rst; - for (i = 0; i < 32; i++, p++) { - /* Isolate a digit */ - c = uiNum % uiRadix; - /* Convert to Ascii */ - *p = c + ((c < 10) ? '0' : '7'); - uiNum /= uiRadix; - if (!uiNum) - break; - } - - for (c = 0; c <= i; c++) { - /* Reverse character order */ - *buf++ = *p--; - } - *buf = '\0'; -} - -static unsigned char * _ltoa(unsigned long l, unsigned char *buf, unsigned char radix) -{ -#if defined (__TI_COMPILER_VERSION) - return ( (unsigned char*)ltoa( l, (char *)buf ) ); -#elif defined( __GNUC__ ) - return ( (char*)ltoa( l, buf, radix ) ); -#else - unsigned char tmp1[10] = "", tmp2[10] = "", tmp3[10] = ""; - unsigned short num1, num2, num3; - unsigned char i; - - buf[0] = '\0'; - - if ( radix == 10 ) { - num1 = l % 10000; - num2 = (l / 10000) % 10000; - num3 = (unsigned short)(l / 100000000); - - if (num3) _itoa(num3, tmp3, 10); - if (num2) _itoa(num2, tmp2, 10); - if (num1) _itoa(num1, tmp1, 10); - - if (num3) { - strcpy((char*)buf, (char const*)tmp3); - for (i = 0; i < 4 - strlen((char const*)tmp2); i++) - strcat((char*)buf, "0"); - } - strcat((char*)buf, (char const*)tmp2); - if (num3 || num2) { - for (i = 0; i < 4 - strlen((char const*)tmp1); i++) - strcat((char*)buf, "0"); - } - strcat((char*)buf, (char const*)tmp1); - if (!num3 && !num2 && !num1) - strcpy((char*)buf, "0"); - } else if ( radix == 16 ) { - num1 = l & 0x0000FFFF; - num2 = l >> 16; - - if (num2) _itoa(num2, tmp2, 16); - if (num1) _itoa(num1, tmp1, 16); - - if (num2) { - strcpy((char*)buf,(char const*)tmp2); - for (i = 0; i < 4 - strlen((char const*)tmp1); i++) - strcat((char*)buf, "0"); - } - strcat((char*)buf, (char const*)tmp1); - if (!num2 && !num1) - strcpy((char*)buf, "0"); - } else - return NULL; - - return buf; -#endif -} - - -/*********************LCD 延时1ms************************************/ -void LCD_DLY_ms(unsigned int ms) -{ - unsigned int a; - while(ms) { - a=1800; - while(a--); - ms--; - } - return; -} - -/*********************LCD写数据************************************/ -void LCD_WrDat(unsigned char dat) -{ - unsigned char i=8, temp=0; - GPIOPinWrite(LCD_DC, 1); - for(i=0; i<8; i++) { //发送一个八位数据 - GPIOPinWrite(LCD_SCL, 0); - - temp = dat&0x80; - if (temp == 0) { - GPIOPinWrite(LCD_SDA, 0); - } else { - GPIOPinWrite(LCD_SDA, 1); - } - GPIOPinWrite(LCD_SCL, 1); - dat<<=1; - } -} -/*********************LCD写命令************************************/ -void LCD_WrCmd(unsigned char cmd) -{ - unsigned char i=8, temp=0; - GPIOPinWrite(LCD_DC, 0); - for(i=0; i<8; i++) { //发送一个八位数据 - GPIOPinWrite(LCD_SCL, 0); - - temp = cmd&0x80; - if (temp == 0) { - GPIOPinWrite(LCD_SDA, 0); - } else { - GPIOPinWrite(LCD_SDA, 1); - } - GPIOPinWrite(LCD_SCL, 1); - cmd<<=1;; - } -} -/*********************LCD 设置坐标************************************/ -void LCD_Set_Pos(unsigned char x, unsigned char y) -{ - LCD_WrCmd(0xb0+y); - LCD_WrCmd(((x&0xf0)>>4)|0x10); - LCD_WrCmd((x&0x0f)|0x01); -} -/*********************LCD全屏************************************/ -void LCD_Fill(unsigned char bmp_dat) -{ - unsigned char y,x; - for(y=0; y<8; y++) { - LCD_WrCmd(0xb0+y); - LCD_WrCmd(0x01); - LCD_WrCmd(0x10); - for(x=0; x126) { - x=0; - y++; - } - LCD_Set_Pos(x,y); - if(c > 0 && c < 92) { - for(i=0; i<6; i++) - LCD_WrDat(F6x8[c][i]); - } - x+=6; - j++; - } -} - -/***********功能描述:显示一行ascii 码?无显示的点阵显示黑色, y为页的范围0~7*****************/ -void HalLcd_HW_WriteLine(unsigned char line, const char *pText) -{ - LCD_FillLine(line, 0); //先把这一行显示成黑色 - LCD_P6x8Str(0, line, (unsigned char *)pText); -} - -#ifdef LCD_SUPPORT -/*******************功能描述:显示8*16一组标准ASCII字符串 显示的坐标(x,y),y为页范围0~7****************/ -void LCD_P8x16Str(unsigned char x, unsigned char y,unsigned char ch[]) -{ - unsigned char c=0,i=0,j=0; - while (ch[j]!='\0') { - c =ch[j]-32; - if(x>120) { - x=0; - y++; - } - LCD_Set_Pos(x,y); - for(i=0; i<8; i++) - LCD_WrDat(F8X16[c*16+i]); - LCD_Set_Pos(x,y+1); - for(i=0; i<8; i++) - LCD_WrDat(F8X16[c*16+i+8]); - x+=8; - j++; - } -} -/*****************功能描述:显示16*16点阵 显示的坐标(x,y),y为页范围0~7****************************/ -void LCD_P16x16Ch(unsigned char x, unsigned char y, unsigned char N) -{ - unsigned char wm=0; - unsigned int adder=32*N; // - LCD_Set_Pos(x, y); - for(wm = 0; wm < 16; wm++) { // - LCD_WrDat(F16x16[adder]); - adder += 1; - } - LCD_Set_Pos(x,y + 1); - for(wm = 0; wm < 16; wm++) { // - LCD_WrDat(F16x16[adder]); - adder += 1; - } -} - -/***********功能描述:显示显示BMP图片128×64起始点坐标(x,y),x的范围0~127,y为页的范围0~7*****************/ -void Draw_BMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]) -{ - unsigned int j=0; - unsigned char x,y; - - if(y1%8==0) y=y1/8; - else y=y1/8+1; - for(y=y0; y HAL_LCD_MAX_CHARS ) - strLen = HAL_LCD_MAX_CHARS; - - if ( option == 0 ) { - /* Line 1 gets saved for later */ - memcpy( Lcd_Line1, str, strLen ); - Lcd_Line1[strLen] = '\0'; - } else { - char buf[64]; - /* Line 2 triggers action */ - tmpLen = (uint8)strlen( (char*)Lcd_Line1 ); - //totalLen = tmpLen + 1 + strLen + 1; - //buf = osal_mem_alloc( totalLen ); - if ( buf != NULL ) { - /* Concatenate strings */ - memcpy( buf, Lcd_Line1, tmpLen ); - buf[tmpLen++] = ' '; - memcpy( &buf[tmpLen], str, strLen ); - buf[tmpLen+strLen] = '\0'; - - /* Send it out */ -#if defined (ZTOOL_P1) || defined (ZTOOL_P2) - -#if defined(SERIAL_DEBUG_SUPPORTED) - debug_str( (uint8*)buf ); -#endif //LCD_SUPPORTED - -#endif //ZTOOL_P1 - - /* Free mem */ - //osal_mem_free( buf ); - } - } - - /* Display the string */ - HalLcd_HW_WriteLine (option, str); - -#endif //HAL_LCD - -} - -/************************************************************************************************** - * @fn HalLcdWriteValue - * - * @brief Write a value to the LCD, - 向lcd指定行写入一个32位的值 - * - * @param value - value that will be displayed, - 需要显示的32位数 - * radix - 8, 10, 16, - 进制,8进制显示 10进制显示,16进制显示 - * option - display options, - 指定行显示 - * - * @return None - **************************************************************************************************/ -void HalLcdWriteValue ( uint32 value, const uint8 radix, uint8 option) -{ -#if (HAL_LCD == TRUE) - uint8 buf[LCD_MAX_BUF]; - - _ltoa( value, &buf[0], radix ); - HalLcdWriteString( (char*)buf, option ); -#endif -} - -/************************************************************************************************** -z-stack代码,未修改 - **************************************************************************************************/ -void HalLcdWriteScreen( char *line1, char *line2 ) -{ -#if (HAL_LCD == TRUE) - HalLcdWriteString( line1, 1 ); - HalLcdWriteString( line2, 2 ); -#endif -} - -/************************************************************************************************** -z-stack代码,未修改 - **************************************************************************************************/ -void HalLcdWriteStringValue( char *title, uint16 value, uint8 format, uint8 line ) -{ -#if (HAL_LCD == TRUE) - uint8 tmpLen; - uint8 buf[LCD_MAX_BUF] = {0}; - uint32 err; - - tmpLen = (uint8)strlen( (char*)title ); - memcpy( buf, title, tmpLen ); - buf[tmpLen] = ' '; - err = (uint32)(value); - _ltoa( err, &buf[tmpLen+1], format ); - HalLcdWriteString( (char*)buf, line ); -#endif -} - -void HalLcdWriteStringString( char *title, uint8 *string, uint8 line ) -{ -#if (HAL_LCD == TRUE) - char str[128]; - sprintf(str, "%s%s", title, (char*)string); - HalLcdWriteString( (char*)str, line ); -#endif -} - - -/************************************************************************************************** -z-stack代码,未修改 - **************************************************************************************************/ -void HalLcdWriteStringValueValue( char *title, uint16 value1, uint8 format1, - uint16 value2, uint8 format2, uint8 line ) -{ - -#if (HAL_LCD == TRUE) - - uint8 tmpLen; - uint8 buf[LCD_MAX_BUF]; - uint32 err; - - tmpLen = (uint8)strlen( (char*)title ); - if ( tmpLen ) { - memcpy( buf, title, tmpLen ); - buf[tmpLen++] = ' '; - } - - err = (uint32)(value1); - _ltoa( err, &buf[tmpLen], format1 ); - tmpLen = (uint8)strlen( (char*)buf ); - - buf[tmpLen++] = ','; - buf[tmpLen++] = ' '; - err = (uint32)(value2); - _ltoa( err, &buf[tmpLen], format2 ); - - HalLcdWriteString( (char *)buf, line ); - -#endif -} - -/************************************************************************************************** -z-stack代码,未修改 - **************************************************************************************************/ -void HalLcdDisplayPercentBar( char *title, uint8 value ) -{ -#if (HAL_LCD == TRUE) - - uint8 percent; - uint8 leftOver; - uint8 buf[17]; - uint32 err; - uint8 x; - - /* Write the title: */ - HalLcdWriteString( title, 0 ); - - if ( value > 100 ) - value = 100; - - /* convert to blocks */ - percent = (uint8)(value / 10); - leftOver = (uint8)(value % 10); - - /* Make window */ - memcpy( buf, "[ ] ", 15 ); - - for ( x = 0; x < percent; x ++ ) { - buf[1+x] = '>'; - } - - if ( leftOver >= 5 ) - buf[1+x] = '+'; - - err = (uint32)value; - _ltoa( err, (uint8*)&buf[13], 10 ); - - HalLcdWriteString( (char*)buf, 1 ); - -#endif - -} - - - - -/********************************************************************* - * @fn Board_openLCD - * - * @brief Open LCD peripheral on SRF06EB. - * - * @param none - * - * @return void - */ -void Board_openLCD(void) -{ -#ifdef TI_DRIVERS_LCD_INCLUDED - HalLcd_HW_Init(); -#endif -} - -/********************************************************************* - * @fn Board_writeString - * - * @brief Write a string on the LCD display. - * - * @param str - string to print - * @param line - line (page) to write (0-7) - * - * @return void - */ -#ifdef TI_DRIVERS_LCD_INCLUDED -void Board_writeString(char *str, uint8_t line) -{ - HalLcdWriteString( (char*)str, line ); -} -#endif - -/********************************************************************* - * @fn Board_writeStringValue - * - * @brief Write a string and value on the LCD display. - * - * @param str - string to print - * @param value - value to print - * @param format - base of the value to print (2,8,16 etc) - * @param line - line (page) to write (0-7) - * - * @return void - */ -void Board_writeStringValue(char *str, uint32_t value, uint8_t format, - uint8_t line) -{ -#ifdef TI_DRIVERS_LCD_INCLUDED - HalLcdWriteStringValue( str, value, format, line ); -#endif -} -#else -// LCD parameter -static LCD_Handle lcdHandle = NULL; - -#ifdef TI_DRIVERS_LCD_INCLUDED -// LCD pin table -PIN_Config LCDPinTable[] = { - Board_3V3_EN | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, // Enable 3V3 domain. Need to be high for LCD to work. - PIN_TERMINATE // Terminate list -}; - -// LCD pin state -PIN_State LCDPinState; - -// LCD pin handle -PIN_Handle hLCDPins; -#endif //TI_DRIVERS_LCD_INCLUDED - -Char lcdBuffer0[LCD_BYTES] = {0}; - -LCD_Buffer lcdBuffers[] = { - {lcdBuffer0, LCD_BYTES, NULL}, -}; - -/********************************************************************* - * PUBLIC FUNCTIONS - */ - -/********************************************************************* - * @fn Board_openLCD - * - * @brief Open LCD peripheral on SRF06EB. - * - * @param none - * - * @return void - */ -void Board_openLCD(void) -{ -#ifdef TI_DRIVERS_LCD_INCLUDED - //Enable the 3V3 demain for the LCD - hLCDPins = PIN_open(&LCDPinState, LCDPinTable); - - LCD_Params lcdParams; - - LCD_Params_init(&lcdParams); - - // Open LCD peripheral - lcdHandle = LCD_open(&lcdBuffers[0], 1, &lcdParams); - - LCD_bufferClear(lcdHandle, 0); - LCD_update(lcdHandle, 0); -#endif -} - -/********************************************************************* - * @fn Board_writeString - * - * @brief Write a string on the LCD display. - * - * @param str - string to print - * @param line - line (page) to write (0-7) - * - * @return void - */ -void Board_writeString(char *str, uint8_t line) -{ - if (lcdHandle != NULL) { - LCD_bufferClearPage(lcdHandle, 0, (LCD_Page)line); - LCD_bufferPrintString(lcdHandle, 0, str, 0, (LCD_Page)line); - LCD_update(lcdHandle, 0); - } -} - -/********************************************************************* - * @fn Board_writeStringValue - * - * @brief Write a string and value on the LCD display. - * - * @param str - string to print - * @param value - value to print - * @param format - base of the value to print (2,8,16 etc) - * @param line - line (page) to write (0-7) - * - * @return void - */ -void Board_writeStringValue(char *str, uint32_t value, uint8_t format, - uint8_t line) -{ - if (lcdHandle != NULL) { - // Write string and 32-bit number - LCD_writeLine(lcdHandle, 0, str, value, format, line); - } -} -#endif -/********************************************************************* -*********************************************************************/ diff --git a/src/example/decode_example/CC26xx/Source/Application/Board/board_led.c.pre b/src/example/decode_example/CC26xx/Source/Application/Board/board_led.c.pre deleted file mode 100644 index adfd112..0000000 --- a/src/example/decode_example/CC26xx/Source/Application/Board/board_led.c.pre +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - Filename: board_led.c - Revised: $Date: 2014-03-10 07:29:12 -0700 (Mon, 10 Mar 2014) $ - Revision: $Revision: 37597 $ - - Description: This file contains the interface to the LED driver. - - Copyright 2014 Texas Instruments Incorporated. All rights reserved. - - IMPORTANT: Your use of this Software is limited to those specific rights - granted under the terms of a software license agreement between the user - who downloaded the software, his/her employer (which must be your employer) - and Texas Instruments Incorporated (the "License"). You may not use this - Software unless you agree to abide by the terms of the License. The License - limits your use, and you acknowledge, that the Software may not be modified, - copied or distributed unless embedded on a Texas Instruments microcontroller - or used solely and exclusively in conjunction with a Texas Instruments radio - frequency transceiver, which is integrated into your product. Other than for - the foregoing purpose, you may not use, reproduce, copy, prepare derivative - works of, modify, distribute, perform, display or sell this Software and/or - its documentation for any purpose. - - YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE - PROVIDED 揂S IS?WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, - INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, - NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL - TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, - NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER - LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES - INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE - OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT - OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES - (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. - - Should you have any questions regarding your right to use this Software, - contact Texas Instruments Incorporated at www.TI.com. -*******************************************************************************/ - -/********************************************************************* - * INCLUDES - */ -#include -#include - -#include -#include -#include -#include - -#include "osal_snv.h" -#include "board_led.h" -#include "Board.h" - -static PIN_State ledPins; -static PIN_Handle hledPins = NULL; - -// PIN configuration structure to set all LED pins as output -PIN_Config ledPinsCfg[] = -{ - Board_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, - Board_LED2 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, - Board_LED3 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, - Board_LED4 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, - PIN_TERMINATE -}; - -void Board_initLeds() -{ - // Initialize KEY pins. Enable int after callback registered - hledPins = PIN_open(&ledPins, ledPinsCfg); - //PIN_registerIntCb(hKeyPins, Board_keyCallback); - -// PIN_setConfig(hledPins, PIN_BM_IRQ, Board_LED1 | PIN_IRQ_DIS); -// PIN_setConfig(hledPins, PIN_BM_IRQ, Board_LED2 | PIN_IRQ_DIS); -// PIN_setConfig(hledPins, PIN_BM_IRQ, Board_LED3 | PIN_IRQ_DIS); -// PIN_setConfig(hledPins, PIN_BM_IRQ, Board_LED4 | PIN_IRQ_DIS); - -#ifdef POWER_SAVING - //Enable wakeup -#endif - - // Setup keycallback for keys -// Util_constructClock(&keyChangeClock, Board_keyChangeHandler, -// KEY_DEBOUNCE_TIMEOUT, 0, false, 0); - -// // Set the application callback -// appKeyChangeHandler = appKeyCB; -} - -void HalLedInit( void ) -{ -// GPIODirModeSet(Board_LED1, GPIO_DIR_MODE_OUT); -// GPIODirModeSet(Board_LED2, GPIO_DIR_MODE_OUT); -// GPIODirModeSet(Board_LED3, GPIO_DIR_MODE_OUT); -// GPIODirModeSet(Board_LED4, GPIO_DIR_MODE_OUT); - -// GPIOPinWrite(Board_LED1, 0); -// GPIOPinWrite(Board_LED2, 0); -// GPIOPinWrite(Board_LED3, 0); -// GPIOPinWrite(Board_LED4, 0); - if(NULL == hledPins) - { - Board_initLeds(); - } -} - -uint8 HalLedSet( uint8 led, uint8 mode ) -{ - uint8 i = 0; - uint8 pin[4] = {Board_LED1, Board_LED2, Board_LED3, Board_LED4}; - - if(NULL == hledPins) - { - Board_initLeds(); - } - - for(i= 0; i<=3; i++) - { - //uint8 k = (0x1<