HWA
Bare metal programming with style
pxa_2.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
35
#define hw_turn__pxa , _hw_tnpxa
36
#define _hw_tnpxa(o,a,p,...) _hwx_tnpxa1(_hw,o,HW_X(p),__VA_ARGS__)
37
38
#define hwa_turn__pxa , _hwa_tnpxa
39
#define _hwa_tnpxa(o,a,p,...) _hwx_tnpxa1(_hwa,o,HW_X(p),__VA_ARGS__)
40
41
#define hw_enable__pxa , _hw_enpxa
42
#define _hw_enpxa(o,a,p,...) _hwx_tnpxa1(_hw,o,HW_X(p),1,__VA_ARGS__)
43
44
#define hwa_enable__pxa , _hwa_enpxa
45
#define _hwa_enpxa(o,a,p,...) _hwx_tnpxa1(_hwa,o,HW_X(p),1,__VA_ARGS__)
46
47
#define hw_disable__pxa , _hw_dspxa
48
#define _hw_dspxa(o,a,p,...) _hwx_tnpxa1(_hw,o,HW_X(p),0,__VA_ARGS__)
49
50
#define hwa_disable__pxa , _hwa_dspxa
51
#define _hwa_dspxa(o,a,p,...) _hwx_tnpxa1(_hwa,o,HW_X(p),0,__VA_ARGS__)
52
53
#define _hwx_tnpxa1(...) _hwx_tnpxa2(__VA_ARGS__)
54
#define _hwx_tnpxa2(h,o,c,...) do{ _HW_B(_hwx_tnpxa2,c)(h,o,c,__VA_ARGS__) }while(0)
55
#define _hwx_tnpxa21(h,o,z,oe,e,...) HW_E(e)
56
#define _hwx_tnpxa20(h,o,c,...) HW_BW(_hwx_tnpxa3,_ioa,c)(h,o,c,__VA_ARGS__)
57
#define _hwx_tnpxa30(h,o,c,p,...) HW_E(HW_EM_OT(p,gpio))
58
#define _hwx_tnpxa31(h,o,c,p,po,bn,bp,v,...) HW_BV(_hwx_tnpxa4,state_,v,h,o,bn,bp) HW_EOL(__VA_ARGS__)
59
#define _hwx_tnpxa40(v,...) HW_E(HW_EM_ST(v))
60
#define _hwx_tnpxa4_(v,v_,h,o,bn,bp) h##_write_m(o,msk,((1U<<bn)-1)<<bp,(((1U<<bn)-1)*v<<bp));
61
#define _hwx_tnpxa41(v,v_,h,o,bn,bp) h##_write_m(o,msk,((1U<<bn)-1)<<bp,(((1U<<bn)-1)*v<<bp));
62
63
96
/*******************************************************************************
97
* *
98
* Context management *
99
* *
100
*******************************************************************************/
101
102
#define _hwa_setup__pxa(o,a) _hwa_setup_r( o, msk )
103
104
#define _hwa_init__pxa(o,a) _hwa_init_r( o, msk, 0x00 )
105
106
#define _hwa_commit__pxa(o,a) _hwa_commit_r( o, msk )
Generated for HWA by
1.8.6