/* ----------------------------------------------------------------------
 * Copyright (C) 2014-2015 Cambridge CMOS Sensors. All rights reserved.
 *
 * $Date:        22 July 2016
 * $Revision: 	V.2016.07.22.2016
 *
 * Project: 	    CCS MOX Library
 * Title:	    ccsmox_profiles.h
 *
 * Description:	Coefficient profile and power configurations for CCS MOX Library
 *
 * Preprocessor Options:
 *     For CCS801, add -DCCS801;
 *     For CCS803, add -DCCS803
 *
 * Copyright Notice
 * ------------
 *
 * Copyright (C) 2014-2016 Cambridge CMOS Sensors. All rights reserved.
 * -------------------------------------------------------------------- */

#ifndef INCCCSMOXPROFILES_H_
#define INCCCSMOXPROFILES_H_

#ifndef _PROFILE_BLOCK_SIZE_
#define _PROFILE_BLOCK_SIZE_
#define PROFILE_BLOCK_SIZE 32
#endif

/**
* @brief default algorithm profile definitions.
*/
#if defined CCS801
uint8_t CCS_PROFILE_VOC_1S[PROFILE_BLOCK_SIZE] = { /** Coefficient Profile For CCS801 - DC Drive Mode*/
    0x6e, 0x6e, 0x29, 0xbd, 0x56, 0x3d, 0x86, 0xdf, 0x26, 0xea, 0x2c, 0x16, 0x61, 0xc8, 0xd3, 0x91,
    0xb5, 0x4e, 0xb9, 0x61, 0xa2, 0xeb, 0x34, 0xac, 0x70, 0xd1, 0xa1, 0xfe, 0x8d, 0x34, 0x60, 0xe9
};
uint8_t CCS_PROFILE_VOC_10S[PROFILE_BLOCK_SIZE] = { /** Coefficient Profile For CCS801 - 10s Drive Mode*/
    0xd1, 0x9d, 0x1f, 0x4, 0xcb, 0x96, 0x17, 0x4, 0x48, 0x96, 0x8e, 0xf4, 0x36, 0x52, 0x42, 0x3f,
    0x7, 0xd6, 0xfd, 0x3b, 0x35, 0x95, 0xfe, 0x6c, 0x1e, 0x35, 0xa4, 0x62, 0x71, 0xc, 0x61, 0xb1
};
uint8_t CCS_PROFILE_VOC_60S[PROFILE_BLOCK_SIZE] = { /** Coefficient Profile For CCS801 - 1 minute Drive Mode*/
    0x34, 0x8b, 0xc1, 0xc0, 0xcc, 0x95, 0xfb, 0x65, 0xca, 0x93, 0xf6, 0x61, 0xab, 0xe5, 0x5d, 0x48,
    0xf8, 0x44, 0x36, 0xba, 0x13, 0xbb, 0x82, 0x3c, 0x4c, 0xa5, 0xdd, 0x74, 0xdb, 0xf, 0x63, 0xa9
};

/**
* @brief Various sensor power configuration for VOC detection
*/
CcsPulseConf CONF_PULSES_VOC_1S[] = {  /* 1s Drive Mode */
    {140, 0, 1000}
};
CcsPulseConf CONF_PULSES_VOC_10S[] = { /* 10s Drive Mode */
    {160, 500, 0},
    {140, 1000, 1000},
    {0, 8500, 0}
};
CcsPulseConf CONF_PULSES_VOC_60S[] = { /* 1 minute Drive Mode */
    {160, 500, 0},
    {140, 1000, 1000},
    {0, 58500, 0}
};
#endif //CCS801

#if defined CCS803

#define CONST_BREATHALYSER_DRIVE_VOLTAGE      160   // volts V x 100, e.g. 140 / 100 = 1.40V
#define CONST_BREATHALYSER_TIME_WARMUP_1      10000U    // milliseconds
#define CONST_BREATHALYSER_TIME_WARMUP_2      10000U    // milliseconds
#define CONST_BREATHALYSER_TIME_MEASUREMENT   10000U   // seconds
#define CONST_BREATHALYSER_TIME_INTERVAL      250U  // milliseconds

uint8_t CCS_PROFILE_BREATHALYSER[PROFILE_BLOCK_SIZE] = { /** Coefficient Profile For CCS803 Breathalyser */
    0x1, 0x41, 0x0, 0x0, 0x0, 0xe0, 0xc8, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};

/**
* @brief Sensor power configuration for Breathalyser
*/
CcsPulseConf CONF_PULSES_BREATHALYSER[] = { {160, 0, 1000} };
#endif //CCS803

#endif /* INCCCSMOXPROFILES_H_ */
