HWA
Bare metal programming with style
wdb_1.h
Go to the documentation of this file.
1 
2 /* This file is part of the HWA project.
3  * Copyright (c) 2012,2015 Christophe Duparquet.
4  * All rights reserved. Read LICENSE.TXT for details.
5  */
6 
28 #define hw_class__wdb
29 
30 /* Class logical registers
31  */
32 #define hw__wdb_if _cb1, csr, 1, 7
33 #define hw__wdb_ie _cb1, csr, 1, 6
34 #define hw__wdb_wdp _cb2, csr, 1, 5, 3, csr, 3, 0, 0
35 #define hw__wdb_wdce _cb1, csr, 1, 4
36 #define hw__wdb_wde _cb1, csr, 1, 3
37 
38 #define hw__wdb_eie _cb2, csr, 1, 3, 1, csr, 1, 6, 0 /* convenient */
39 #define hw__wdb_ifie _cb1, csr, 2, 6 /* convenient for clearing irq */
40 #define hw__wdb_wdall _cb1, csr, 7, 0 /* convenient for turning wd off */
41 
42 
43 #if !defined __ASSEMBLER__
44 
45 typedef struct {
46  hwa_r8_t csr ;
47 
48  struct {
49  uint8_t action, timeout ;
50  } config ;
51 
52 } hwa_wdb_t ;
53 
54 #endif