tempdrv.h File Reference
TEMPDRV API definition.
- Version
- 5.4.0
License
(C) Copyright 2014 Silicon Labs, www.silabs.com
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:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.
Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.
Definition in file
tempdrv.h
.
#include "
em_device.h
"
#include "
em_emu.h
"
#include "
ecode.h
"
#include "tempdrv_config.h"
Macros |
|
#define | ECODE_EMDRV_TEMPDRV_BAD_LIMIT ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000003) |
Temperature mismatch with limit.
|
|
#define | ECODE_EMDRV_TEMPDRV_DUP_TEMP ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000008) |
Requested temperature is a duplicate.
|
|
#define | ECODE_EMDRV_TEMPDRV_NO_CALLBACK ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000004) |
Can't find callback.
|
|
#define | ECODE_EMDRV_TEMPDRV_NO_INIT ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000001) |
Function requires prior initialization.
|
|
#define | ECODE_EMDRV_TEMPDRV_NO_SPACE ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000005) |
No more space to register.
|
|
#define | ECODE_EMDRV_TEMPDRV_OK ( ECODE_OK ) |
Success return value.
|
|
#define | ECODE_EMDRV_TEMPDRV_PARAM_ERROR ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000002) |
Illegal input parameter.
|
|
#define | ECODE_EMDRV_TEMPDRV_TEMP_OVER ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000007) |
Requested temperature above measurable range.
|
|
#define | ECODE_EMDRV_TEMPDRV_TEMP_UNDER ( ECODE_EMDRV_TEMPDRV_BASE | 0x00000006) |
Requested temperature below measurable range.
|
|
Typedefs |
|
typedef void(* | TEMPDRV_Callback_t ) (int8_t temp, TEMPDRV_LimitType_t limit) |
TEMPDRV temperature limit callback function.
|
|
typedef enum TEMPDRV_LimitType | TEMPDRV_LimitType_t |
Enumerations |
|
enum |
TEMPDRV_LimitType
{
TEMPDRV_LIMIT_LOW = 0, TEMPDRV_LIMIT_HIGH = 1 } |
Functions |
|
Ecode_t | TEMPDRV_DeInit (void) |
De-initialize the TEMP driver.
|
|
Ecode_t | TEMPDRV_Enable (bool enable) |
Enable or disable the TEMP driver.
|
|
uint8_t | TEMPDRV_GetActiveCallbacks ( TEMPDRV_LimitType_t limit) |
Get the number of active callbacks for a limit.
|
|
int8_t | TEMPDRV_GetTemp (void) |
Get the current temperature.
|
|
Ecode_t | TEMPDRV_Init (void) |
Initialize the TEMP driver.
|
|
void | TEMPDRV_IRQHandler (void) |
TEMPDRV IRQ Handler.
|
|
Ecode_t | TEMPDRV_RegisterCallback (int8_t temp, TEMPDRV_LimitType_t limit, TEMPDRV_Callback_t callback) |
Register a callback in the TEMP driver.
|
|
Ecode_t | TEMPDRV_UnregisterCallback ( TEMPDRV_Callback_t callback) |
Unregister a callback in the TEMP driver.
|
|