1 /* 2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef _HARDWARE_STRUCTS_SIO_H 8 #define _HARDWARE_STRUCTS_SIO_H 9 10 #include "hardware/address_mapped.h" 11 #include "hardware/regs/sio.h" 12 #include "hardware/structs/interp.h" 13 14 typedef struct { 15 io_ro_32 cpuid; 16 io_ro_32 gpio_in; 17 io_ro_32 gpio_hi_in; 18 uint32_t _pad; 19 20 io_wo_32 gpio_out; 21 io_wo_32 gpio_set; 22 io_wo_32 gpio_clr; 23 io_wo_32 gpio_togl; 24 25 io_wo_32 gpio_oe; 26 io_wo_32 gpio_oe_set; 27 io_wo_32 gpio_oe_clr; 28 io_wo_32 gpio_oe_togl; 29 30 io_wo_32 gpio_hi_out; 31 io_wo_32 gpio_hi_set; 32 io_wo_32 gpio_hi_clr; 33 io_wo_32 gpio_hi_togl; 34 35 io_wo_32 gpio_hi_oe; 36 io_wo_32 gpio_hi_oe_set; 37 io_wo_32 gpio_hi_oe_clr; 38 io_wo_32 gpio_hi_oe_togl; 39 40 io_rw_32 fifo_st; 41 io_wo_32 fifo_wr; 42 io_ro_32 fifo_rd; 43 io_ro_32 spinlock_st; 44 45 io_rw_32 div_udividend; 46 io_rw_32 div_udivisor; 47 io_rw_32 div_sdividend; 48 io_rw_32 div_sdivisor; 49 50 io_rw_32 div_quotient; 51 io_rw_32 div_remainder; 52 io_rw_32 div_csr; 53 54 uint32_t _pad2; 55 56 interp_hw_t interp[2]; 57 } sio_hw_t; 58 59 #define sio_hw ((sio_hw_t *)SIO_BASE) 60 61 #endif 62