//******************************************************************************
//! @file       cc1101_easy_link_reg_config.h
//! @brief      Template for CC112x register export from SmartRF Studio 
//
//  Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
//
//  Redistribution and use in source and binary forms, with or without
//  modification, are permitted provided that the following conditions
//  are met:
//
//      Redistributions of source code must retain the above copyright
//      notice, this list of conditions and the following disclaimer.
//
//      Redistributions in binary form must reproduce the above copyright
//      notice, this list of conditions and the following disclaimer in the
//      documentation and/or other materials provided with the distribution.
//
//      Neither the name of Texas Instruments Incorporated nor the names of
//      its contributors may be used to endorse or promote products derived
//      from this software without specific prior written permission.
//
//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
//  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
//  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
//  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
//  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
//  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
//  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
//  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//*****************************************************************************/


#ifndef CC1101_EASY_LINK_REG_CONFIG_H
#define CC1101_EASY_LINK_REG_CONFIG_H


#ifdef __cplusplus
extern "C" {
#endif


/*******************************************************************************
 * INCLUDES
 */
#include "hal_spi_rf_trxeb.h"
#include "cc110L_spi.h"


/*******************************************************************************
 * FUNCTIONS
 */
// Address Config = No address check 
// Base Frequency = 432.999817 
// CRC Autoflush = false 
// CRC Enable = true 
// Carrier Frequency = 432.999817 
// Channel Spacing = 199.951172 
// Data Format = Normal mode 
// Data Rate = 1.19948 
// Deviation = 5.157471 
// Device Address = 0 
// Manchester Enable = false 
// Modulation Format = OOK 
// Packet Length = 255 
// Packet Length Mode = Variable packet length mode. Packet length configured by the first byte after sync word 
// Preamble Count = 4 
// RX Filter BW = 58.035714 
// Sync Word Qualifier Mode = 30/32 sync word bits detected 
// TX Power = unknown 
// PA table 
#define PA_TABLE {0x00,0x50}

static const registerSetting_t preferredSettings[]= 
{
  {CC110L_IOCFG0,      0x06},
  {CC110L_FIFOTHR,     0x47},
  {CC110L_PKTCTRL0,    0x05},
  {CC110L_FSCTRL1,     0x06},
  {CC110L_FREQ2,       0x10},
  {CC110L_FREQ1,       0xA7},
  {CC110L_FREQ0,       0x62},
  {CC110L_MDMCFG4,     0xF5},
  {CC110L_MDMCFG3,     0x83},
  {CC110L_MDMCFG2,     0x33},
  {CC110L_DEVIATN,     0x15},
  {CC110L_MCSM0,       0x18},
  {CC110L_FOCCFG,      0x14},
  {CC110L_AGCCTRL0,    0x92},
  {CC110L_FREND0,      0x11},
  {CC110L_FSCAL3,      0xE9},
  {CC110L_FSCAL2,      0x2A},
  {CC110L_FSCAL1,      0x00},
  {CC110L_FSCAL0,      0x1F},
  {CC110L_TEST2,       0x81},
  {CC110L_TEST1,       0x35},
  {CC110L_TEST0,       0x09},
};

#ifdef  __cplusplus
}
#endif

#endif