EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
si114x_functions.c File Reference

Detailed Description

Si114x reusable functions.

Version
5.1.1

License

Copyright 2015 Silicon Labs, Inc. http://www.silabs.com

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgement in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

Definition in file si114x_functions.c.

#include "si114x_functions.h"

Go to the source code of this file.

Data Structures

struct  cal_ref_t
 Structure Definition for calref array. More...
 
struct  operand_t
 The fx20_divide and fx20_multiply uses this structure to pass values into it. More...
 

Macros

#define FORCE_ROUND_16   1
 This compile switch used only to experiment with various rounding precisions. The flexibility has a small performance price.
 
#define INCLUDE_SI114X_CALIBRATIONCODE   1
 INCLUDE_SI114X_CALIBRATIONCODE should be assigned to 1 for the Si1132, Si1145, Si1146 and Si1147. For the Si1141, Si1142 and Si1143, assign it to 0 to save code space.
 
#define INCLUDE_SI114X_COMPRESS_CODE   1
 INCLUDE_SI114X_COMPRESS_CODE should be assigned to 1 for the Si1141, Si1142, Si1143. This switch should be assigned to 0 only if it is certain that the code is not used elsewhere.
 

Functions

uint8_t Compress (uint16_t input)
 Converts a 16-bit value to 8-bit value. More...
 
int16_t si114x_get_calibration (HANDLE si114x_handle, SI114X_CAL_S *si114x_cal, uint8_t security)
 Populates the SI114X_CAL_S structure. More...
 
int16_t si114x_set_ucoef (HANDLE si114x_handle, uint8_t *input_ucoef, SI114X_CAL_S *si114x_cal)
 Initializes the Si113x/46/47/48 UCOEF Registers. More...
 
int16_t Si114xAlsForce (HANDLE si114x_handle)
 Sends an ALSFORCE command to the Si113x/4x. More...
 
int16_t Si114xNop (HANDLE si114x_handle)
 Sends a NOP command to the Si113x/4x. More...
 
int16_t Si114xParamRead (HANDLE si114x_handle, uint8_t address)
 Reads a Parameter from the Si113x/4x. More...
 
int16_t Si114xParamSet (HANDLE si114x_handle, uint8_t address, uint8_t value)
 Writes a byte to an Si113x/4x Parameter. More...
 
int16_t Si114xPauseAll (HANDLE si114x_handle)
 Pauses autonomous measurements. More...
 
int16_t Si114xPsAlsAuto (HANDLE si114x_handle)
 Sends a PSALSAUTO command to the Si113x/4x. More...
 
int16_t Si114xPsAlsForce (HANDLE si114x_handle)
 Sends a PSALSFORCE command to the Si113x/4x. More...
 
int16_t Si114xPsForce (HANDLE si114x_handle)
 Sends a PSFORCE command to the Si113x/4x. More...
 
int16_t Si114xReset (HANDLE si114x_handle)
 Resets the Si113x/4x, clears any interrupts and initializes the HW_KEY register. More...
 
uint16_t Uncompress (uint8_t input)
 Converts an 8-bit compressed value to 16-bit. More...
 

Variables

struct cal_ref_t calref [2]
 Factory Calibration Reference Values. More...
 

Variable Documentation

struct cal_ref_t calref[2]
Initial value:
=
{
{
FLT_TO_FX20( 4.021290),
FLT_TO_FX20(57.528500),
FLT_TO_FX20( 2.690010),
FLT_TO_FX20( 0.042903),
FLT_TO_FX20( 0.633435),
FLT_TO_FX20(23.902900),
FLT_TO_FX20(56.889300),
{0x7B, 0x6B, 0x01, 0x00}
},
{
FLT_TO_FX20( 2.325484),
FLT_TO_FX20(33.541500),
FLT_TO_FX20( 1.693750),
FLT_TO_FX20( 0.026775),
FLT_TO_FX20( 0.398443),
FLT_TO_FX20(12.190900),
FLT_TO_FX20(56.558200),
{0xdb, 0x8f, 0x01, 0x00}
}
}

Factory Calibration Reference Values.

Definition at line 793 of file si114x_functions.c.