Initial commit

Dependencies:   FastPWM

Committer:
lypinator
Date:
Wed Sep 16 01:11:49 2020 +0000
Revision:
0:bb348c97df44
Added PWM

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lypinator 0:bb348c97df44 1 /*---------------------------------------------------------------------------
lypinator 0:bb348c97df44 2 * Copyright (c) 2016, u-blox Malmö, All Rights Reserved
lypinator 0:bb348c97df44 3 * SPDX-License-Identifier: LicenseRef-PBL
lypinator 0:bb348c97df44 4 *
lypinator 0:bb348c97df44 5 * This file and the related binary are licensed under the
lypinator 0:bb348c97df44 6 * Permissive Binary License, Version 1.0 (the "License");
lypinator 0:bb348c97df44 7 * you may not use these files except in compliance with the License.
lypinator 0:bb348c97df44 8 *
lypinator 0:bb348c97df44 9 * You may obtain a copy of the License here:
lypinator 0:bb348c97df44 10 * LICENSE-permissive-binary-license-1.0.txt and at
lypinator 0:bb348c97df44 11 * https://www.mbed.com/licenses/PBL-1.0
lypinator 0:bb348c97df44 12 *
lypinator 0:bb348c97df44 13 * See the License for the specific language governing permissions and
lypinator 0:bb348c97df44 14 * limitations under the License.
lypinator 0:bb348c97df44 15 *
lypinator 0:bb348c97df44 16 * Component: Watchdog
lypinator 0:bb348c97df44 17 * File: cb_watchdog.h
lypinator 0:bb348c97df44 18 *
lypinator 0:bb348c97df44 19 * Description: Functionality for watchdog and reset.
lypinator 0:bb348c97df44 20 *-------------------------------------------------------------------------*/
lypinator 0:bb348c97df44 21 #ifndef _CB_WATCHDOG_H_
lypinator 0:bb348c97df44 22 #define _CB_WATCHDOG_H_
lypinator 0:bb348c97df44 23
lypinator 0:bb348c97df44 24 #include "cb_comdefs.h"
lypinator 0:bb348c97df44 25
lypinator 0:bb348c97df44 26 #ifdef __cplusplus
lypinator 0:bb348c97df44 27 extern "C" {
lypinator 0:bb348c97df44 28 #endif
lypinator 0:bb348c97df44 29
lypinator 0:bb348c97df44 30 /*===========================================================================
lypinator 0:bb348c97df44 31 * DEFINES
lypinator 0:bb348c97df44 32 *=========================================================================*/
lypinator 0:bb348c97df44 33
lypinator 0:bb348c97df44 34 /*===========================================================================
lypinator 0:bb348c97df44 35 * TYPES
lypinator 0:bb348c97df44 36 *=========================================================================*/
lypinator 0:bb348c97df44 37
lypinator 0:bb348c97df44 38
lypinator 0:bb348c97df44 39 /*===========================================================================
lypinator 0:bb348c97df44 40 * FUNCTIONS
lypinator 0:bb348c97df44 41 *=========================================================================*/
lypinator 0:bb348c97df44 42
lypinator 0:bb348c97df44 43 /**
lypinator 0:bb348c97df44 44 * Put watchdog in a defined state.
lypinator 0:bb348c97df44 45 */
lypinator 0:bb348c97df44 46 void cbWD_init(void);
lypinator 0:bb348c97df44 47
lypinator 0:bb348c97df44 48 /**
lypinator 0:bb348c97df44 49 * Resets the CPU.
lypinator 0:bb348c97df44 50 */
lypinator 0:bb348c97df44 51 void cbWD_systemReset(void);
lypinator 0:bb348c97df44 52
lypinator 0:bb348c97df44 53 /**
lypinator 0:bb348c97df44 54 * Enables watchdog. Watchdog needs to be polled using cbWD_poll() with
lypinator 0:bb348c97df44 55 * shorter intervals then specified by timeInMilliseconds.
lypinator 0:bb348c97df44 56 *
lypinator 0:bb348c97df44 57 * @param timeInMilliseconds Watchdog timeout in milliseconds.
lypinator 0:bb348c97df44 58 */
lypinator 0:bb348c97df44 59 void cbWD_enable(cb_uint32 timeInMilliseconds);
lypinator 0:bb348c97df44 60
lypinator 0:bb348c97df44 61 /**
lypinator 0:bb348c97df44 62 * Poll the watchdog timer. This must be done with shorter intervalls
lypinator 0:bb348c97df44 63 * than the time in cbWD_enable().
lypinator 0:bb348c97df44 64 */
lypinator 0:bb348c97df44 65 void cbWD_poll(void);
lypinator 0:bb348c97df44 66
lypinator 0:bb348c97df44 67 #ifdef __cplusplus
lypinator 0:bb348c97df44 68 }
lypinator 0:bb348c97df44 69 #endif
lypinator 0:bb348c97df44 70
lypinator 0:bb348c97df44 71 #endif /* _CB_WATCHDOG_H_ */