From 5d78f839a5d2fecba19028fcdc64e3a8358dd49f Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 11 Aug 2024 17:29:43 +0200 Subject: [PATCH] removes attribute packed as it disables word access generation by gcc --- include/ehrenberg/devices/gen/aclint.h | 4 ++-- include/ehrenberg/devices/gen/apb3spi.h | 10 +++++----- include/ehrenberg/devices/gen/camera.h | 4 ++-- include/ehrenberg/devices/gen/dma.h | 4 ++-- include/ehrenberg/devices/gen/gpio.h | 4 ++-- include/ehrenberg/devices/gen/i2s.h | 4 ++-- include/ehrenberg/devices/gen/timercounter.h | 4 ++-- include/ehrenberg/devices/gen/uart.h | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/ehrenberg/devices/gen/aclint.h b/include/ehrenberg/devices/gen/aclint.h index 0b76640..d228ba6 100644 --- a/include/ehrenberg/devices/gen/aclint.h +++ b/include/ehrenberg/devices/gen/aclint.h @@ -12,7 +12,7 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t MSIP0; uint8_t fill0[16380]; volatile uint32_t MTIMECMP0LO; @@ -88,4 +88,4 @@ inline void set_aclint_mtime_hi(volatile aclint_t* reg, uint32_t value){ reg->MTIME_HI = (reg->MTIME_HI & ~(0xffffffffU << 0)) | (value << 0); } -#endif /* _BSP_ACLINT_H */ \ No newline at end of file +#endif /* _BSP_ACLINT_H */ diff --git a/include/ehrenberg/devices/gen/apb3spi.h b/include/ehrenberg/devices/gen/apb3spi.h index f0ad8ec..1493f3a 100644 --- a/include/ehrenberg/devices/gen/apb3spi.h +++ b/include/ehrenberg/devices/gen/apb3spi.h @@ -12,22 +12,22 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t DATA; volatile uint32_t STATUS; volatile uint32_t CONFIG; volatile uint32_t INTR; - uint8_t fill0[16]; + uint32_t fill0[4]; volatile uint32_t SCLK_CONFIG; volatile uint32_t SSGEN_SETUP; volatile uint32_t SSGEN_HOLD; volatile uint32_t SSGEN_DISABLE; volatile uint32_t SSGEN_ACTIVE_HIGH; - uint8_t fill1[12]; + uint32_t fill1[3]; volatile uint32_t XIP_ENABLE; volatile uint32_t XIP_CONFIG; volatile uint32_t XIP_MODE; - uint8_t fill2[4]; + uint32_t fill2[1]; volatile uint32_t XIP_WRITE; volatile uint32_t XIP_READ_WRITE; volatile uint32_t XIP_READ; @@ -421,4 +421,4 @@ inline uint32_t get_apb3spi_xip_read_data(volatile apb3spi_t* reg){ return (reg->XIP_READ >> 0) & 0xff; } -#endif /* _BSP_APB3SPI_H */ \ No newline at end of file +#endif /* _BSP_APB3SPI_H */ diff --git a/include/ehrenberg/devices/gen/camera.h b/include/ehrenberg/devices/gen/camera.h index b2c6dec..4966c82 100644 --- a/include/ehrenberg/devices/gen/camera.h +++ b/include/ehrenberg/devices/gen/camera.h @@ -12,7 +12,7 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t PIXEL; volatile uint32_t CONTROL; volatile uint32_t STATUS; @@ -157,4 +157,4 @@ inline void set_camera_ip_frame_finished_irq_pend(volatile camera_t* reg, uint8_ reg->IP = (reg->IP & ~(0x1U << 1)) | (value << 1); } -#endif /* _BSP_CAMERA_H */ \ No newline at end of file +#endif /* _BSP_CAMERA_H */ diff --git a/include/ehrenberg/devices/gen/dma.h b/include/ehrenberg/devices/gen/dma.h index d49cc3a..5b1f188 100644 --- a/include/ehrenberg/devices/gen/dma.h +++ b/include/ehrenberg/devices/gen/dma.h @@ -12,7 +12,7 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t CONTROL; volatile uint32_t STATUS; volatile uint32_t IE; @@ -451,4 +451,4 @@ inline void set_dma_ch1_dst_addr_inc_dst_stride(volatile dma_t* reg, uint32_t va reg->CH1_DST_ADDR_INC = (reg->CH1_DST_ADDR_INC & ~(0xfffffU << 12)) | (value << 12); } -#endif /* _BSP_DMA_H */ \ No newline at end of file +#endif /* _BSP_DMA_H */ diff --git a/include/ehrenberg/devices/gen/gpio.h b/include/ehrenberg/devices/gen/gpio.h index 157cd12..616788e 100644 --- a/include/ehrenberg/devices/gen/gpio.h +++ b/include/ehrenberg/devices/gen/gpio.h @@ -12,7 +12,7 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t VALUE; volatile uint32_t WRITE; volatile uint32_t WRITEENABLE; @@ -116,4 +116,4 @@ inline uint32_t get_gpio_boot_sel_bootSel(volatile gpio_t* reg){ return (reg->BOOT_SEL >> 0) & 0x7; } -#endif /* _BSP_GPIO_H */ \ No newline at end of file +#endif /* _BSP_GPIO_H */ diff --git a/include/ehrenberg/devices/gen/i2s.h b/include/ehrenberg/devices/gen/i2s.h index 8a36d26..0361c58 100644 --- a/include/ehrenberg/devices/gen/i2s.h +++ b/include/ehrenberg/devices/gen/i2s.h @@ -12,7 +12,7 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t LEFT_CH; volatile uint32_t RIGHT_CH; volatile uint32_t CONTROL; @@ -215,4 +215,4 @@ inline uint32_t get_i2s_ip_right_sample_avail(volatile i2s_t* reg){ return (reg->IP >> 1) & 0x1; } -#endif /* _BSP_I2S_H */ \ No newline at end of file +#endif /* _BSP_I2S_H */ diff --git a/include/ehrenberg/devices/gen/timercounter.h b/include/ehrenberg/devices/gen/timercounter.h index 81ea79a..04ad0f6 100644 --- a/include/ehrenberg/devices/gen/timercounter.h +++ b/include/ehrenberg/devices/gen/timercounter.h @@ -12,7 +12,7 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t PRESCALER; volatile uint32_t T0_CTRL; volatile uint32_t T0_OVERFLOW; @@ -138,4 +138,4 @@ inline uint32_t get_timercounter_t1_value(volatile timercounter_t* reg){ return (reg->T1_VALUE >> 0) & 0xffffffff; } -#endif /* _BSP_TIMERCOUNTER_H */ \ No newline at end of file +#endif /* _BSP_TIMERCOUNTER_H */ diff --git a/include/ehrenberg/devices/gen/uart.h b/include/ehrenberg/devices/gen/uart.h index ebb3970..eab7c20 100644 --- a/include/ehrenberg/devices/gen/uart.h +++ b/include/ehrenberg/devices/gen/uart.h @@ -12,7 +12,7 @@ #include -typedef struct __attribute((__packed__)) { +typedef struct { volatile uint32_t RX_TX_REG; volatile uint32_t INT_CTRL_REG; volatile uint32_t CLK_DIVIDER_REG; @@ -233,4 +233,4 @@ inline void set_uart_status_reg_clear_break(volatile uart_t* reg, uint8_t value) reg->STATUS_REG = (reg->STATUS_REG & ~(0x1U << 11)) | (value << 11); } -#endif /* _BSP_UART_H */ \ No newline at end of file +#endif /* _BSP_UART_H */