HWA
Bare metal programming with style
gpa_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 
26 #define hw_class__gpa
27 
28 /* Class registers class, address, rwm, rfm
29  */
30 #define hw__gpa_port _r8, 0x02, 0xFF, 0x00
31 #define hw__gpa_ddr _r8, 0x01, 0xFF, 0x00
32 #define hw__gpa_pin _r8, 0x00, 0xFF, 0x00
33 
34 /* (portx,p) notation
35  */
36 #define hw__gpa_ , _hw_gpa_
37 #define _hw_gpa_(o,p,a) HW_BX(_hw_gpa,_hw_isa_3bn_,p)(o,p)
38 #define _hw_gpa1(o,p) _ioa,o##_1_##p,(o,1,p)
39 #define _hw_gpa0(o,p) ,(o,p),HW_EM_OO(o,p)
40 
41 
42 #if !defined __ASSEMBLER__
43 
44 typedef struct {
45  hwa_r8_t port ;
46  hwa_r8_t ddr ;
47 } hwa_gpa_t ;
48 
49 #endif