RTEMS 6.1-rc5
Loading...
Searching...
No Matches
watchdog-defs.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2014 Taller Technologies.
11 *
12 * @author Boretto Martin (martin.boretto@tallertechnologies.com)
13 * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
14 * @author Lenarduzzi Federico (federico.lenarduzzi@tallertechnologies.com)
15 * @author Daniel Chicco (daniel.chicco@tallertechnologies.com)
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.org/license/LICENSE.
20 */
21
22#ifndef LIBBSP_ARM_LPC176X_WATCHDOG_DEFS_H
23#define LIBBSP_ARM_LPC176X_WATCHDOG_DEFS_H
24
25#include <rtems/score/cpu.h>
26#include <bsp.h>
27#include <bspopts.h>
28#include <bsp/utility.h>
29#include <bsp/irq.h>
30#include <bsp/common-types.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
36#define LPC176X_WDMOD_BASE 0x40000000U
37#define LPC176X_WDFEED_CON 0XAAU
38#define LPC176X_WDFEED_CFG 0X55U
39#define LPC176X_WD_PRESCALER_DIVISOR 4000000U
40#define LPC176X_WWDT_MOD_WDEN BSP_BIT32( 0 )
41#define LPC176X_WWDT_MOD_WDRESET BSP_BIT32( 1 )
42#define LPC176X_WWDT_MOD_WDTOF BSP_BIT32( 2 )
43#define LPC176X_WWDT_MOD_WDINT BSP_BIT32( 3 )
44#define LPC176X_WWDT_CLKSEL_WDSEL_IRC 0x0U
45#define LPC176X_WWDT_CLKSEL_WDSEL_PCLK 0x1U
46#define LPC176X_WWDT_CLKSEL_WDSEL_RTC 0x2U
47#define LPC176X_WD_INTERRUPT_VECTOR_NUMBER 0U
48#define LPC176X_WDMOD ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + 0x00U ) )
49#define LPC176X_WDTC ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + 0x04U ) )
50#define LPC176X_WDFEED ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + \
51 0x08U ) )
52#define LPC176X_WDTV ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + 0x0CU ) )
53#define LPC176X_WDCLKSEL ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + \
54 0x10U ) )
55
60
61#ifdef __cplusplus
62}
63#endif /* __cplusplus */
64
65#endif /* LIBBSP_ARM_LPC176X_WATCHDOG_DEFS_H */
Definitions types used by some devices in common.
void(* rtems_interrupt_handler)(void *)
Interrupt handler routines shall have this type.
Definition: intr.h:1030
This header file provides utility macros for BSPs.
rtems_interrupt_handler lpc176x_wd_isr_funct
A function that attends an interruption for a watchdog.
Definition: watchdog-defs.h:59