49 lines
1006 B
ArmAsm
49 lines
1006 B
ArmAsm
.global ___Serial_Open
|
|
.global ___Serial_Close
|
|
.global ___Serial_ReadByte
|
|
.global ___Serial_ReadBytes
|
|
.global ___Serial_WriteByte
|
|
.global ___Serial_WriteBytes
|
|
.global ___Serial_GetRxBufferSize
|
|
.global ___Serial_GetTxBufferFreeCapacity
|
|
.global ___Serial_ClearReceiveBuffer
|
|
.global ___Serial_ClearTransmitBuffer
|
|
.global ___OS_InnerWait_ms
|
|
|
|
#define syscall_(id, syscall_table) \
|
|
mov.l syscall_table, r2 ;\
|
|
mov.l 1f, r0 ;\
|
|
jmp @r2 ;\
|
|
nop ;\
|
|
.balign 4 ;\
|
|
1: .long id
|
|
|
|
#define syscall(id) syscall_(id, syscall_table)
|
|
|
|
___Serial_Open:
|
|
syscall(0x418)
|
|
___Serial_Close:
|
|
syscall(0x419)
|
|
___Serial_ReadByte:
|
|
syscall(0x040C)
|
|
___Serial_ReadBytes:
|
|
syscall(0x040D)
|
|
___Serial_WriteByte:
|
|
syscall(0x040E)
|
|
___Serial_WriteBytes:
|
|
syscall(0x040F)
|
|
___Serial_GetRxBufferSize:
|
|
syscall(0x0411)
|
|
___Serial_GetTxBufferFreeCapacity:
|
|
syscall(0x0412)
|
|
___Serial_ClearReceiveBuffer:
|
|
syscall(0x0413)
|
|
___Serial_ClearTransmitBuffer:
|
|
syscall(0x0414)
|
|
|
|
___OS_InnerWait_ms:
|
|
syscall(0x0420)
|
|
|
|
syscall_table:
|
|
.long 0x80010070
|