XenevaOS
Loading...
Searching...
No Matches
Macros
bordoisila_io.h File Reference
#include <stdint.h>
#include <Hal/AA64/aa64lowlevel.h>
#include <bordoisila_bits.h>
#include <Board/board.h>
Include dependency graph for bordoisila_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _bordoisila_readb(addr)   (*(volatile uint8_t*)(addr))
 
#define _bordoisila_writeb(val, addr)
 
#define _bordoisila_readw(addr)   (*(volatile uint16_t*)(addr))
 
#define _bordoisila_writew(addr)
 
#define _bordoisila_readl(addr)   (*(volatile uint32_t*)(addr))
 
#define _bordoisila_writel(val, addr)
 
#define _bordoisila_read_poll_timeout(addr, val, cond, sleep_us, timeout_us)
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ _bordoisila_read_poll_timeout

#define _bordoisila_read_poll_timeout (   addr,
  val,
  cond,
  sleep_us,
  timeout_us 
)
Value:
({\
uint32_t __timeout_us = (timeout_us);\
uint32_t __elapsed_us = 0; \
int __ret = 0; \
while(1){ \
(val) = *(volatile uint32_t*)(addr);\
if (cond)\
break;\
if (__elapsed_us >= __timeout_us) {\
__ret = -1; \
break;\
} \
if (sleep_us) { \
AuAA64BoardSleepUS(sleep_us); \
__elapsed_us += (sleep_us); \
}else {\
__elapsed_us++; \
}\
}\
__ret; \
})
unsigned int uint32_t
Definition acefiex.h:163

◆ _bordoisila_readb

#define _bordoisila_readb (   addr)    (*(volatile uint8_t*)(addr))

◆ _bordoisila_readl

#define _bordoisila_readl (   addr)    (*(volatile uint32_t*)(addr))

◆ _bordoisila_readw

#define _bordoisila_readw (   addr)    (*(volatile uint16_t*)(addr))

◆ _bordoisila_writeb

#define _bordoisila_writeb (   val,
  addr 
)
Value:
(*(volatile uint8_t*)(addr) = (val));\
dsb_sy_barrier(); \
dsb_ish();\
isb_flush();
unsigned char uint8_t
Definition acefiex.h:161

◆ _bordoisila_writel

#define _bordoisila_writel (   val,
  addr 
)
Value:
(*(volatile uint32_t*)(addr) = (val));\
dsb_sy_barrier(); \
dsb_ish();\
isb_flush();

◆ _bordoisila_writew

#define _bordoisila_writew (   addr)
Value:
(*(volatile uint16_t*)(addr) = (val));\
dsb_sy_barrier(); \
dsb_ish();\
isb_flush();
unsigned short int uint16_t
Definition acefiex.h:162