Xtensa port: Removed duplicate file and renamed to sys_io.h as other platforms.

Change-Id: I293bfa9ff8c5e641c727612c56968cec901dbfec
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This commit is contained in:
Mazen NEIFER 2017-01-31 11:17:02 +01:00 committed by Andrew Boie
commit aacfd63331
3 changed files with 3 additions and 114 deletions

View file

@ -20,6 +20,7 @@ extern "C" {
#endif
#if !defined(_ASMLANGUAGE) && !defined(__ASSEMBLER__)
#include "sys_io.h" /* Include from the very same folder of this file */
#include <stdint.h>
#include <sw_isr_table.h>
#include <arch/xtensa/xtensa_irq.h>

View file

@ -43,6 +43,7 @@ static ALWAYS_INLINE void sys_clear_bit(mem_addr_t addr, unsigned int bit)
static ALWAYS_INLINE int sys_test_bit(mem_addr_t addr, unsigned int bit)
{
int temp = *(volatile int *)addr;
return (int)(temp & (1 << bit));
}
@ -53,7 +54,8 @@ static ALWAYS_INLINE int sys_test_and_set_bit(mem_addr_t addr, unsigned int bit)
return retval;
}
static ALWAYS_INLINE int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit)
static ALWAYS_INLINE
int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit)
{
int retval = (*(volatile int *)addr) & (1 << bit);
*(volatile int *)addr = (*(volatile int *)addr) & ~(1 << bit);