Kamcho Library 02.00.03  lib.kamcho.02.00.03.287
Data Structures | Typedefs | Enumerations | Functions
wdt_device.h File Reference
#include <stdint.h>
#include "hdf.h"
#include "errno.h"

Go to the source code of this file.

Data Structures

struct  WDT_State_t
 A structure to represent the state of a WDT device. More...
 
struct  WDT_Device_t
 A structure to represent WDT device. More...
 

Typedefs

typedef const struct WDT_Device_t WDT_Device_Type
 
typedef void(* wdt_cb_func_t) (WDT_Device_Type *dev)
 
typedef const struct WDT_Device_t WDT_Device_t
 A structure to represent WDT device. More...
 

Enumerations

enum  { WDT_MODE_DISABLE, WDT_MODE_INTERRUPT, WDT_MODE_RESET }
 

Functions

WDT_Device_tWDT_devRequest (void)
 WDT Request Device. More...
 
int32_t WDT_devIsReset (WDT_Device_t *dev)
 Check if Watch Reset Occurred. More...
 
int32_t WDT_devClear (WDT_Device_t *dev)
 Clear Watchdog Timer. More...
 
int32_t WDT_devInit (WDT_Device_t *dev, uint8_t mode, uint8_t time, void *cb)
 Initialize Watchdog Timer. More...
 

Detailed Description

This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.

Typedef Documentation

typedef void(* wdt_cb_func_t) (WDT_Device_Type *dev)
typedef const struct WDT_Device_t WDT_Device_t

A structure to represent WDT device.

typedef const struct WDT_Device_t WDT_Device_Type

Enumeration Type Documentation

anonymous enum
Enumerator
WDT_MODE_DISABLE 
WDT_MODE_INTERRUPT 
WDT_MODE_RESET 

Function Documentation

int32_t WDT_devClear ( WDT_Device_t dev)

Clear Watchdog Timer.

Parameters
devThe pointer to WDT device
Returns
0 for success or error code upon a failure.
int32_t WDT_devInit ( WDT_Device_t dev,
uint8_t  mode,
uint8_t  time,
void *  cb 
)

Initialize Watchdog Timer.

Parameters
devThe pointer to WDT device,
modeThe enumeration of watchdog timer mode.
timeThe enumeration of time settings.
cbThe pointer to the call back function if it is set to interrupt mode.
Returns
0 for success or error code upon a failure.
int32_t WDT_devIsReset ( WDT_Device_t dev)

Check if Watch Reset Occurred.

Parameters
devThe pointer to WDT device
Returns
1 for reset occurred, 0 for no reset occurred or error code upon a failure.
WDT_Device_t* WDT_devRequest ( void  )

WDT Request Device.

Returns
The pointer to the WDT device instance.

WDT Request Device.