cleaned up CC26XX example
This commit is contained in:
Binary file not shown.
BIN
src/example/decode_example/CC26xx/IAR.zip
Normal file
BIN
src/example/decode_example/CC26xx/IAR.zip
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -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 “AS 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 <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ti/sysbios/knl/Task.h>
|
||||
#include <ti/sysbios/knl/Clock.h>
|
||||
#include <ti/sysbios/knl/Semaphore.h>
|
||||
#include <ti/sysbios/knl/Queue.h>
|
||||
|
||||
#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<<i);
|
||||
if(led & (0x1<<i))
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case HAL_LED_MODE_OFF:
|
||||
PIN_setOutputValue(hledPins, pin[i], 0);
|
||||
break;
|
||||
case HAL_LED_MODE_ON:
|
||||
PIN_setOutputValue(hledPins, pin[i], 1);
|
||||
break;
|
||||
case HAL_LED_MODE_FLASH:
|
||||
PIN_setOutputValue(hledPins, pin[i], 1);
|
||||
Task_sleep(10*1000/Clock_tickPeriod);
|
||||
PIN_setOutputValue(hledPins, pin[i], 0);
|
||||
break;
|
||||
|
||||
case HAL_LED_MODE_TOGGLE:
|
||||
PIN_setOutputValue(hledPins, pin[i], !PIN_getOutputValue( pin[i]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -85,9 +85,6 @@
|
||||
|
||||
#include "buffer.h"
|
||||
|
||||
#include "driverlib/Aon_batmon.h"
|
||||
#include "..\profiles\batt\cc26xx\Battservice.h"
|
||||
|
||||
/*********************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
@@ -190,46 +187,6 @@ static uint8_t source_tv[1024] =
|
||||
0x0A, 0x0A, 0x07, 0x0A, 0x0A, 0x08
|
||||
};
|
||||
|
||||
static uint8_t source_ac[1024] =
|
||||
{
|
||||
0x1D, 0x00, 0x00, 0x09, 0x00, 0x10, 0x00, 0x18, 0x00, 0xFF, 0xFF, 0x33, 0x00, 0xFF, 0xFF, 0x34,
|
||||
0x00, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x76, 0x00, 0x7E, 0x01, 0xA6, 0x01, 0xCC, 0x01, 0xFF, 0xFF, 0xDC, 0x01, 0xE9, 0x01, 0xF6,
|
||||
0x01, 0xF8, 0x01, 0xFA, 0x01, 0xFC, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x33, 0x31, 0x30, 0x30, 0x2C,
|
||||
0x39, 0x31, 0x30, 0x30, 0x35, 0x30, 0x30, 0x2C, 0x35, 0x30, 0x30, 0x35, 0x30, 0x30, 0x2C, 0x31,
|
||||
0x35, 0x30, 0x30, 0x36, 0x26, 0x35, 0x36, 0x30, 0x2C, 0x32, 0x35, 0x30, 0x30, 0x2C, 0x33, 0x30,
|
||||
0x30, 0x30, 0x2C, 0x39, 0x30, 0x30, 0x30, 0x7C, 0x2D, 0x31, 0x26, 0x35, 0x30, 0x30, 0x31, 0x30,
|
||||
0x30, 0x31, 0x30, 0x30, 0x31, 0x42, 0x32, 0x30, 0x36, 0x43, 0x30, 0x30, 0x38, 0x33, 0x32, 0x30,
|
||||
0x39, 0x41, 0x46, 0x30, 0x41, 0x37, 0x31, 0x30, 0x42, 0x30, 0x30, 0x30, 0x43, 0x31, 0x31, 0x30,
|
||||
0x44, 0x43, 0x30, 0x30, 0x45, 0x30, 0x32, 0x39, 0x32, 0x30, 0x46, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x46, 0x30, 0x30, 0x31, 0x31, 0x32, 0x41, 0x46, 0x37, 0x31, 0x30, 0x30, 0x31, 0x31, 0x46,
|
||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30, 0x30, 0x34, 0x43, 0x35,
|
||||
0x30, 0x30, 0x46, 0x35, 0x38, 0x35, 0x43, 0x30, 0x32, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30,
|
||||
0x46, 0x34, 0x43, 0x35, 0x30, 0x30, 0x45, 0x35, 0x38, 0x35, 0x43, 0x30, 0x33, 0x30, 0x39, 0x34,
|
||||
0x30, 0x34, 0x34, 0x30, 0x30, 0x34, 0x43, 0x35, 0x30, 0x30, 0x46, 0x35, 0x38, 0x35, 0x43, 0x30,
|
||||
0x34, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30, 0x46, 0x34, 0x43, 0x35, 0x30, 0x30, 0x45, 0x35,
|
||||
0x38, 0x35, 0x43, 0x30, 0x35, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30, 0x46, 0x34, 0x43, 0x35,
|
||||
0x30, 0x30, 0x45, 0x35, 0x38, 0x35, 0x43, 0x30, 0x36, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30,
|
||||
0x45, 0x34, 0x43, 0x35, 0x30, 0x30, 0x45, 0x35, 0x38, 0x35, 0x43, 0x30, 0x37, 0x30, 0x39, 0x34,
|
||||
0x30, 0x34, 0x34, 0x30, 0x30, 0x34, 0x43, 0x35, 0x30, 0x30, 0x46, 0x35, 0x38, 0x35, 0x43, 0x30,
|
||||
0x38, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30, 0x46, 0x34, 0x43, 0x35, 0x30, 0x30, 0x45, 0x35,
|
||||
0x38, 0x35, 0x43, 0x30, 0x39, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30, 0x46, 0x34, 0x43, 0x35,
|
||||
0x30, 0x30, 0x45, 0x35, 0x38, 0x35, 0x43, 0x30, 0x41, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30,
|
||||
0x45, 0x34, 0x43, 0x35, 0x30, 0x30, 0x45, 0x35, 0x38, 0x35, 0x43, 0x30, 0x42, 0x30, 0x39, 0x34,
|
||||
0x30, 0x34, 0x34, 0x30, 0x46, 0x34, 0x43, 0x35, 0x30, 0x30, 0x45, 0x35, 0x38, 0x35, 0x43, 0x30,
|
||||
0x43, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30, 0x45, 0x34, 0x43, 0x35, 0x30, 0x30, 0x45, 0x35,
|
||||
0x38, 0x35, 0x43, 0x30, 0x44, 0x30, 0x39, 0x34, 0x30, 0x34, 0x34, 0x30, 0x45, 0x34, 0x43, 0x35,
|
||||
0x30, 0x30, 0x45, 0x35, 0x38, 0x35, 0x43, 0x30, 0x45, 0x30, 0x33, 0x36, 0x30, 0x36, 0x34, 0x30,
|
||||
0x31, 0x30, 0x33, 0x36, 0x30, 0x36, 0x34, 0x30, 0x34, 0x30, 0x33, 0x36, 0x30, 0x36, 0x34, 0x30,
|
||||
0x30, 0x30, 0x33, 0x36, 0x30, 0x36, 0x34, 0x30, 0x33, 0x30, 0x33, 0x36, 0x30, 0x36, 0x34, 0x30,
|
||||
0x32, 0x30, 0x33, 0x36, 0x34, 0x36, 0x38, 0x30, 0x31, 0x30, 0x33, 0x36, 0x34, 0x36, 0x38, 0x30,
|
||||
0x35, 0x30, 0x36, 0x36, 0x34, 0x36, 0x38, 0x30, 0x39, 0x35, 0x38, 0x35, 0x43, 0x30, 0x38, 0x30,
|
||||
0x33, 0x36, 0x34, 0x36, 0x38, 0x30, 0x42, 0x30, 0x33, 0x34, 0x38, 0x34, 0x43, 0x30, 0x41, 0x30,
|
||||
0x33, 0x34, 0x38, 0x34, 0x43, 0x30, 0x46, 0x54, 0x26, 0x30, 0x2C, 0x31, 0x7C, 0x53, 0x26, 0x31,
|
||||
0x2C, 0x32, 0x2C, 0x33, 0x54, 0x26, 0x30, 0x2C, 0x31, 0x7C, 0x53, 0x26, 0x31, 0x2C, 0x32, 0x2C,
|
||||
0x33, 0x4E, 0x41, 0x4E, 0x41, 0x4E, 0x41, 0x31
|
||||
};
|
||||
|
||||
static uint16_t user_data[USER_DATA_SIZE] = { 0 };
|
||||
|
||||
uint16_t code_length_tv = SAMPLE_TV_CODE_LENGTH;
|
||||
|
||||
Reference in New Issue
Block a user