From fbadd0a6f47bd92fd4ec9c7bf894017897d36467 Mon Sep 17 00:00:00 2001 From: NouranAbdelaziz Date: Sun, 12 May 2024 17:27:33 +0300 Subject: [PATCH] update fw --- fw/EF_GPIO8.c | 16 ++++++---------- fw/EF_GPIO8_regs.h | 14 +++++++------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/fw/EF_GPIO8.c b/fw/EF_GPIO8.c index 15b89e9..dd7e7e8 100644 --- a/fw/EF_GPIO8.c +++ b/fw/EF_GPIO8.c @@ -53,11 +53,7 @@ void EF_GPIO8_setPinDirection(uint32_t gpio_base, int pin, int dir){ gpio->DIR = directions; } -void EF_GPIO8_setIM(uint32_t gpio_base, int data){ - - EF_GPIO8_TYPE* gpio = (EF_GPIO8_TYPE*)gpio_base; - gpio->im = data; -} + // Interrupts bits in RIS, MIS, IM, and ICR // bit 0: TX FIFO is Empty @@ -74,31 +70,31 @@ void EF_GPIO8_setIM(uint32_t gpio_base, int data){ int EF_GPIO8_getRIS(uint32_t gpio_base){ EF_GPIO8_TYPE* gpio = (EF_GPIO8_TYPE*)gpio_base; - return (gpio->ris); + return (gpio->RIS); } int EF_GPIO8_getMIS(uint32_t gpio_base){ EF_GPIO8_TYPE* gpio = (EF_GPIO8_TYPE*)gpio_base; - return (gpio->mis); + return (gpio->MIS); } void EF_GPIO8_setIM(uint32_t gpio_base, int mask){ EF_GPIO8_TYPE* gpio = (EF_GPIO8_TYPE*)gpio_base; - gpio->im |= mask; + gpio->IM |= mask; } int EF_GPIO8_getIM(uint32_t gpio_base){ EF_GPIO8_TYPE* gpio = (EF_GPIO8_TYPE*)gpio_base; - return (gpio->im); + return (gpio->IM); } void EF_GPIO8_setICR(uint32_t gpio_base, int mask){ EF_GPIO8_TYPE* gpio = (EF_GPIO8_TYPE*)gpio_base; - (gpio->icr) |= mask; + (gpio->IC) |= mask; } #endif // GPIO_H \ No newline at end of file diff --git a/fw/EF_GPIO8_regs.h b/fw/EF_GPIO8_regs.h index 5bc6d7b..ffcdb1d 100644 --- a/fw/EF_GPIO8_regs.h +++ b/fw/EF_GPIO8_regs.h @@ -1,7 +1,7 @@ /* - Copyright 2023 Efabless Corp. + Copyright 2024 Efabless Corp. - Author: Mohamed Shalan (mshalan@aucegypt.edu) + Author: Mohamed Shalan (mshalan@efabless.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -65,11 +65,11 @@ typedef struct _EF_GPIO8_TYPE_ { __R DATAI; __W DATAO; __W DIR; - __R reserved[957]; - __RW im; - __R mis; - __R ris; - __W icr; + __R reserved_0[16317]; + __RW IM; + __R MIS; + __R RIS; + __W IC; } EF_GPIO8_TYPE; #endif