hw_gpio32 ports.S
1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#include "os_type.h"
#if 0//def TIMER0_ENABLE
//#include "tx_port.h"
//#include "xtensa_rtos.h"
//#include "xtensa_timer.h"
//#include <xtensa/corebits.h>
//#include <xtensa/config/system.h>
#if 1
#include <xtensa/config/core.h>
#else
#ifdef __XTENSA__
#include <xtensa/hal.h>
#include <xtensa/xtensa-versions.h>
#else
#include "../hal.h"
#include "../xtensa-versions.h"
#endif
/* CONFIGURATION SPECIFIC DEFINITIONS: */
#ifdef __XTENSA__
#include <xtensa/config/core-isa.h>
#include <xtensa/config/core-matmap.h>
#include <xtensa/config/tie.h>
#else
#include "core-isa.h"
#include "core-matmap.h"
#include "tie.h"
#endif
#endif
//#include <cstub-Xm_Optek_HiFi3_Dev_05.h>
//#include <cstub-Xm_Optek_HiFi3_Dev_05-c.h>
#if defined (_ASMLANGUAGE) || defined (__ASSEMBLER__)
#ifdef __XTENSA__
#include <xtensa/config/tie-asm.h>
#else
#include "tie-asm.h"
#endif
#endif /*_ASMLANGUAGE or __ASSEMBLER__*/
.text
.align 4
/* .literal_position*/
/* .section ._xtensa_timer1_init, "ax"*/
/* .section .internal_ram_1_text, "ax"*/
.global hw_gpio32_port_init
.type hw_gpio32_port_init, @function
/* .extern _xt_tick_divisor*/
hw_gpio32_port_init:
//ENTRY(16)
entry sp, 16
movi a0, 0x50
RUR.EXPSTATE a0 /*Read the value of 32-bit exported state EXPSTATE into AR*/
READ_IMPWIRE a1 /*Read the value of 32-bit input port IMPWIRE into AR*/
WUR.EXPSTATE a1 /*Write the contents of 32-bit AR register to the exported state EXPSTATE*/
// WRMASK_EXPSTATE
// WRMASK_EXPSTATE a1, 0x01
CLRB_EXPSTATE 0x01
SETB_EXPSTATE 0x01
//RET(16)
retw
#endif //