Remapped VGPIO on fastcalls for efficiency.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15773 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
662045f991
commit
0c16eb68db
|
@ -233,39 +233,39 @@ extern "C" {
|
|||
__attribute__((always_inline))
|
||||
static inline uint32_t __pal_lld_readport(ioportid_t port) {
|
||||
|
||||
__syscall2r(200, SB_VGPIO_READ, port);
|
||||
__syscall2r(224, SB_VGPIO_READ, port);
|
||||
return (ioportmask_t)r0;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline uint32_t __pal_lld_readlatch(ioportid_t port) {
|
||||
|
||||
__syscall2r(200, SB_VGPIO_READLATCH, port);
|
||||
__syscall2r(224, SB_VGPIO_READLATCH, port);
|
||||
return (ioportmask_t)r0;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void __pal_lld_writeport(ioportid_t port, uint32_t bits) {
|
||||
|
||||
__syscall3r(200, SB_VGPIO_WRITE, port, bits);
|
||||
__syscall3r(224, SB_VGPIO_WRITE, port, bits);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void __pal_lld_setport(ioportid_t port, uint32_t bits) {
|
||||
|
||||
__syscall3r(200, SB_VGPIO_SET, port, bits);
|
||||
__syscall3r(224, SB_VGPIO_SET, port, bits);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void __pal_lld_clearport(ioportid_t port, uint32_t bits) {
|
||||
|
||||
__syscall3r(200, SB_VGPIO_CLEAR, port, bits);
|
||||
__syscall3r(224, SB_VGPIO_CLEAR, port, bits);
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void __pal_lld_toggleport(ioportid_t port, uint32_t bits) {
|
||||
|
||||
__syscall3r(200, SB_VGPIO_TOGGLE, port, bits);
|
||||
__syscall3r(224, SB_VGPIO_TOGGLE, port, bits);
|
||||
}
|
||||
|
||||
#endif /* HAL_USE_PAL == TRUE */
|
||||
|
|
|
@ -49,19 +49,25 @@
|
|||
#define SB_SYSC_EVENT_WAIT_ALL 10
|
||||
#define SB_SYSC_EVENT_BROADCAST 11
|
||||
#define SB_SYSC_LOADELF 12
|
||||
#define SB_SYSC_VHAL_VGPIO 200
|
||||
#define SB_SYSC_VHAL_VUART 201
|
||||
#define SB_SYSC_VHAL_VUART 96
|
||||
#define SB_SYSC_VRQ_SET_ALARM 125
|
||||
#define SB_SYSC_VRQ_RESET_ALARM 126
|
||||
#define SB_SYSC_VRQ_WAIT 127
|
||||
#define SB_SYSC_VRQ_SETWT 248
|
||||
#define SB_SYSC_VRQ_CLRWT 249
|
||||
#define SB_SYSC_VRQ_SETEN 250
|
||||
#define SB_SYSC_VRQ_CLREN 251
|
||||
#define SB_SYSC_VRQ_DISABLE 252
|
||||
#define SB_SYSC_VRQ_ENABLE 253
|
||||
#define SB_SYSC_VRQ_GETISR 254
|
||||
#define SB_SYSC_VRQ_RETURN 255
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Fastcall codes
|
||||
* @{
|
||||
*/
|
||||
#define SB_FASTC_VHAL_VGPIO 224
|
||||
#define SB_FASTC_VRQ_SETWT 248
|
||||
#define SB_FASTC_VRQ_CLRWT 249
|
||||
#define SB_FASTC_VRQ_SETEN 250
|
||||
#define SB_FASTC_VRQ_CLREN 251
|
||||
#define SB_FASTC_VRQ_DISABLE 252
|
||||
#define SB_FASTC_VRQ_ENABLE 253
|
||||
#define SB_FASTC_VRQ_GETISR 254
|
||||
#define SB_FASTC_VRQ_RETURN 255
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
/**
|
||||
* @brief API handler for VHAL PAL driver.
|
||||
*/
|
||||
#define SB_SVC200_HANDLER sb_api_vio_gpio
|
||||
#define SB_SVC224_HANDLER sb_api_vio_gpio
|
||||
|
||||
/**
|
||||
* @name VIO GPIO permissions
|
||||
|
|
Loading…
Reference in New Issue