Skip to content

Commit 06e86e9

Browse files
committed
Revert "drivers: gpio_cc13xx_cc26xx: Update for latest sdk"
This reverts commit 99e7223. Breaks CI with the following compilation error in SPI.c:52: error: 'SPI_MASTER' undeclared here (not in a function) Failing tests (cc3220sf_launchxl/cc3220sf) - sample.net.sockets.echo.offload.simplelink - sample.net.sockets.http_get.offload.simplelink - sample.net.wifi Signed-off-by: Benjamin Cabé <[email protected]>
1 parent d6c59f0 commit 06e86e9

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

drivers/gpio/gpio_cc13xx_cc26xx.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
/* the rest are for general (non-interrupt) config */
3333
#define IOCFG_GEN_MASK (~IOCFG_INT_MASK)
3434

35-
/* GPIO all DIOs mask */
36-
#define GPIO_DIO_ALL_MASK 0xFFFFFFFF
37-
3835
struct gpio_cc13xx_cc26xx_data {
3936
/* gpio_driver_data needs to be first */
4037
struct gpio_driver_data common;
@@ -131,38 +128,41 @@ static int gpio_cc13xx_cc26xx_port_get_raw(const struct device *port,
131128
{
132129
__ASSERT_NO_MSG(value != NULL);
133130

134-
*value = HWREG(GPIO_BASE + GPIO_O_DIN31_0) & GPIO_DIO_ALL_MASK;
131+
*value = GPIO_readMultiDio(GPIO_DIO_ALL_MASK);
135132

136133
return 0;
137134
}
138135

139-
static int gpio_cc13xx_cc26xx_port_set_bits_raw(const struct device *port, uint32_t mask)
136+
static int gpio_cc13xx_cc26xx_port_set_masked_raw(const struct device *port,
137+
uint32_t mask,
138+
uint32_t value)
140139
{
141-
HWREG(GPIO_BASE + GPIO_O_DOUTSET31_0) = mask;
140+
GPIO_setMultiDio(mask & value);
141+
GPIO_clearMultiDio(mask & ~value);
142142

143143
return 0;
144144
}
145145

146-
static int gpio_cc13xx_cc26xx_port_clear_bits_raw(const struct device *port, uint32_t mask)
146+
static int gpio_cc13xx_cc26xx_port_set_bits_raw(const struct device *port,
147+
uint32_t mask)
147148
{
148-
HWREG(GPIO_BASE + GPIO_O_DOUTCLR31_0) = mask;
149+
GPIO_setMultiDio(mask);
149150

150151
return 0;
151152
}
152153

153-
static int gpio_cc13xx_cc26xx_port_set_masked_raw(const struct device *port, uint32_t mask,
154-
uint32_t value)
154+
static int gpio_cc13xx_cc26xx_port_clear_bits_raw(const struct device *port,
155+
uint32_t mask)
155156
{
156-
gpio_cc13xx_cc26xx_port_set_bits_raw(port, mask & value);
157-
gpio_cc13xx_cc26xx_port_clear_bits_raw(port, mask & ~value);
157+
GPIO_clearMultiDio(mask);
158158

159159
return 0;
160160
}
161161

162162
static int gpio_cc13xx_cc26xx_port_toggle_bits(const struct device *port,
163163
uint32_t mask)
164164
{
165-
HWREG(GPIO_BASE + GPIO_O_DOUTTGL31_0) = mask;
165+
GPIO_toggleMultiDio(mask);
166166

167167
return 0;
168168
}
@@ -209,16 +209,16 @@ static int gpio_cc13xx_cc26xx_manage_callback(const struct device *port,
209209

210210
static uint32_t gpio_cc13xx_cc26xx_get_pending_int(const struct device *dev)
211211
{
212-
return HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) & GPIO_DIO_ALL_MASK;
212+
return GPIO_getEventMultiDio(GPIO_DIO_ALL_MASK);
213213
}
214214

215215
static void gpio_cc13xx_cc26xx_isr(const struct device *dev)
216216
{
217217
struct gpio_cc13xx_cc26xx_data *data = dev->data;
218218

219-
uint32_t status = HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) & GPIO_DIO_ALL_MASK;
219+
uint32_t status = GPIO_getEventMultiDio(GPIO_DIO_ALL_MASK);
220220

221-
HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) = status;
221+
GPIO_clearEventMultiDio(status);
222222

223223
gpio_fire_callbacks(&data->callbacks, dev, status);
224224
}

samples/boards/ti/cc13x2_cc26x2/system_off/src/main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
#include <driverlib/ioc.h>
1616

17-
/* GPIO all DIOs mask */
18-
#define GPIO_DIO_ALL_MASK 0xFFFFFFFF
19-
2017
static const struct gpio_dt_spec sw0_gpio = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios);
2118

2219
#define BUSY_WAIT_S 5U
@@ -59,8 +56,8 @@ int main(void)
5956
printk("Powering off; press BUTTON1 to restart\n");
6057

6158
/* Clear GPIO interrupt */
62-
status = HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) & GPIO_DIO_ALL_MASK;
63-
HWREG(GPIO_BASE + GPIO_O_EVFLAGS31_0) = status;
59+
status = GPIO_getEventMultiDio(GPIO_DIO_ALL_MASK);
60+
GPIO_clearEventMultiDio(status);
6461

6562
sys_poweroff();
6663

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ manifest:
253253
groups:
254254
- hal
255255
- name: hal_ti
256-
revision: 46407c76196ca250c3f955376d52dc3ea25ba381
256+
revision: 258652a3ac5d7df68ba8df20e4705c3bd98ede38
257257
path: modules/hal/ti
258258
groups:
259259
- hal

0 commit comments

Comments
 (0)