Skip to content

Commit 5aecf9d

Browse files
pflnashif
authored andcommitted
boards: Rename reserved function names
Rename reserved function names in the boards/ subdirectory. Signed-off-by: Patrik Flykt <[email protected]>
1 parent 7c0a245 commit 5aecf9d

File tree

12 files changed

+41
-41
lines changed

12 files changed

+41
-41
lines changed

boards/posix/native_posix/board_irq.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
extern "C" {
1616
#endif
1717

18-
void _isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
18+
void z_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
1919
void *isr_param_p);
2020
void z_irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags);
2121

@@ -32,7 +32,7 @@ void z_irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags);
3232
*/
3333
#define Z_ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
3434
({ \
35-
_isr_declare(irq_p, 0, isr_p, isr_param_p); \
35+
z_isr_declare(irq_p, 0, isr_p, isr_param_p); \
3636
z_irq_priority_set(irq_p, priority_p, flags_p); \
3737
irq_p; \
3838
})
@@ -45,7 +45,7 @@ void z_irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags);
4545
*/
4646
#define Z_ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
4747
({ \
48-
_isr_declare(irq_p, ISR_FLAG_DIRECT, (void (*)(void *))isr_p, NULL); \
48+
z_isr_declare(irq_p, ISR_FLAG_DIRECT, (void (*)(void *))isr_p, NULL); \
4949
z_irq_priority_set(irq_p, priority_p, flags_p); \
5050
irq_p; \
5151
})

boards/posix/native_posix/irq_handler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ int posix_get_current_irq(void)
235235
/**
236236
* Configure a static interrupt.
237237
*
238-
* _isr_declare will populate the interrupt table table with the interrupt's
238+
* z_isr_declare will populate the interrupt table table with the interrupt's
239239
* parameters, the vector table and the software ISR table.
240240
*
241241
* We additionally set the priority in the interrupt controller at
@@ -247,7 +247,7 @@ int posix_get_current_irq(void)
247247
* @param isr_param_p ISR parameter
248248
* @param flags_p IRQ options
249249
*/
250-
void _isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
250+
void z_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
251251
void *isr_param_p)
252252
{
253253
irq_vector_table[irq_p].irq = irq_p;
@@ -316,7 +316,7 @@ void irq_offload(irq_offload_routine_t routine, void *parameter)
316316
{
317317
off_routine = routine;
318318
off_parameter = parameter;
319-
_isr_declare(OFFLOAD_SW_IRQ, 0, offload_sw_irq_handler, NULL);
319+
z_isr_declare(OFFLOAD_SW_IRQ, 0, offload_sw_irq_handler, NULL);
320320
z_arch_irq_enable(OFFLOAD_SW_IRQ);
321321
posix_sw_set_pending_IRQ(OFFLOAD_SW_IRQ);
322322
z_arch_irq_disable(OFFLOAD_SW_IRQ);

boards/posix/nrf52_bsim/board_irq.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
extern "C" {
1616
#endif
1717

18-
void _isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
18+
void z_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
1919
void *isr_param_p);
2020
void z_irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags);
2121

@@ -32,7 +32,7 @@ void z_irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags);
3232
*/
3333
#define Z_ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
3434
({ \
35-
_isr_declare(irq_p, 0, isr_p, isr_param_p); \
35+
z_isr_declare(irq_p, 0, isr_p, isr_param_p); \
3636
z_irq_priority_set(irq_p, priority_p, flags_p); \
3737
irq_p; \
3838
})
@@ -45,7 +45,7 @@ void z_irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags);
4545
*/
4646
#define Z_ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
4747
({ \
48-
_isr_declare(irq_p, ISR_FLAG_DIRECT, (void (*)(void *))isr_p, NULL); \
48+
z_isr_declare(irq_p, ISR_FLAG_DIRECT, (void (*)(void *))isr_p, NULL); \
4949
z_irq_priority_set(irq_p, priority_p, flags_p); \
5050
irq_p; \
5151
})

boards/posix/nrf52_bsim/irq_handler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ int posix_get_current_irq(void)
298298
/**
299299
* Configure a static interrupt.
300300
*
301-
* _isr_declare will populate the interrupt table table with the interrupt's
301+
* z_isr_declare will populate the interrupt table table with the interrupt's
302302
* parameters, the vector table and the software ISR table.
303303
*
304304
* We additionally set the priority in the interrupt controller at
@@ -310,7 +310,7 @@ int posix_get_current_irq(void)
310310
* @param isr_param_p ISR parameter
311311
* @param flags_p IRQ options
312312
*/
313-
void _isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
313+
void z_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
314314
void *isr_param_p)
315315
{
316316
irq_vector_table[irq_p].irq = irq_p;
@@ -379,7 +379,7 @@ void irq_offload(irq_offload_routine_t routine, void *parameter)
379379
{
380380
off_routine = routine;
381381
off_parameter = parameter;
382-
_isr_declare(OFFLOAD_SW_IRQ, 0, offload_sw_irq_handler, NULL);
382+
z_isr_declare(OFFLOAD_SW_IRQ, 0, offload_sw_irq_handler, NULL);
383383
z_arch_irq_enable(OFFLOAD_SW_IRQ);
384384
posix_sw_set_pending_IRQ(OFFLOAD_SW_IRQ);
385385
z_arch_irq_disable(OFFLOAD_SW_IRQ);

boards/riscv32/hifive1/prci.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#ifndef _SIFIVE_PRCI_H
88
#define _SIFIVE_PRCI_H
99

10-
#define _REG32(p, i) (*(volatile uint32_t *) ((p) + (i)))
11-
#define PRCI_REG(offset) _REG32(PRCI_BASE_ADDR, offset)
10+
#define Z_REG32(p, i) (*(volatile uint32_t *) ((p) + (i)))
11+
#define PRCI_REG(offset) Z_REG32(PRCI_BASE_ADDR, offset)
1212

1313
/* Register offsets */
1414

boards/x86/arduino_101/pinmux.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/*
1919
* This is the full pinmap that we have available on the board for configuration
2020
* including the ball position and the various modes that can be set. In the
21-
* _pinmux_defaults we do not spend any time setting values that are using mode
21+
* pinmux_defaults we do not spend any time setting values that are using mode
2222
* A as the hardware brings up all devices by default in mode A.
2323
*/
2424

@@ -111,7 +111,7 @@
111111
*/
112112
#define PINMUX_MAX_REGISTERS 5
113113

114-
static void _pinmux_defaults(u32_t base)
114+
static void pinmux_defaults(u32_t base)
115115
{
116116
u32_t mux_config[PINMUX_MAX_REGISTERS] = { 0, 0, 0, 0, 0 };
117117
int i = 0;
@@ -151,18 +151,18 @@ static void _pinmux_defaults(u32_t base)
151151
}
152152
}
153153

154-
static inline void _pinmux_pullups(u32_t base_address)
154+
static inline void pinmux_pullups(u32_t base_address)
155155
{
156-
_quark_mcu_set_mux(base_address + PINMUX_PULLUP_OFFSET, 104,
156+
z_quark_mcu_set_mux(base_address + PINMUX_PULLUP_OFFSET, 104,
157157
PINMUX_PULLUP_ENABLE);
158158
}
159159

160160
static int pinmux_initialize(struct device *port)
161161
{
162162
ARG_UNUSED(port);
163163

164-
_pinmux_defaults(PINMUX_BASE_ADDR);
165-
_pinmux_pullups(PINMUX_BASE_ADDR);
164+
pinmux_defaults(PINMUX_BASE_ADDR);
165+
pinmux_pullups(PINMUX_BASE_ADDR);
166166

167167
return 0;
168168
}

boards/x86/galileo/pinmux.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ static struct mux_path _galileo_path[PINMUX_NUM_PINS * NUM_PIN_FUNCS] = {
482482
{ NONE, 0, DONT_CARE, (GPIO_DIR_IN) } } },
483483
};
484484

485-
int _galileo_pinmux_set_pin(struct device *port, u8_t pin, u32_t func)
485+
int z_galileo_pinmux_set_pin(struct device *port, u8_t pin, u32_t func)
486486
{
487487
struct galileo_data * const drv_data = port->driver_data;
488488

@@ -576,7 +576,7 @@ int _galileo_pinmux_set_pin(struct device *port, u8_t pin, u32_t func)
576576
return 0;
577577
}
578578

579-
int _galileo_pinmux_get_pin(struct device *port, u32_t pin, u32_t *func)
579+
int z_galileo_pinmux_get_pin(struct device *port, u32_t pin, u32_t *func)
580580
{
581581
struct galileo_data * const drv_data = port->driver_data;
582582
struct pin_config *mux_config = drv_data->mux_config;
@@ -662,7 +662,7 @@ static int pinmux_set(struct device *dev,
662662
return -EINVAL;
663663
}
664664

665-
return _galileo_pinmux_set_pin(dev, pin, func);
665+
return z_galileo_pinmux_set_pin(dev, pin, func);
666666
}
667667

668668
static int pinmux_get(struct device *dev,
@@ -673,7 +673,7 @@ static int pinmux_get(struct device *dev,
673673
return -EINVAL;
674674
}
675675

676-
return _galileo_pinmux_get_pin(dev, pin, func);
676+
return z_galileo_pinmux_get_pin(dev, pin, func);
677677
}
678678

679679
static struct pinmux_driver_api api_funcs = {
@@ -733,7 +733,7 @@ static int pinmux_galileo_initialize(struct device *port)
733733
* from the above mapping as selected by the end user
734734
*/
735735
for (i = 0; i < PINMUX_NUM_PINS; i++) {
736-
_galileo_pinmux_set_pin(port,
736+
z_galileo_pinmux_set_pin(port,
737737
mux_config[i].pin_num,
738738
mux_config[i].mode);
739739
}

boards/x86/galileo/pinmux_galileo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ struct galileo_data {
2929

3030
struct galileo_data galileo_pinmux_driver;
3131

32-
int _galileo_pinmux_set_pin(struct device *port, u8_t pin, u32_t func);
32+
int z_galileo_pinmux_set_pin(struct device *port, u8_t pin, u32_t func);
3333

34-
int _galileo_pinmux_get_pin(struct device *port, u32_t pin, u32_t *func);
34+
int z_galileo_pinmux_get_pin(struct device *port, u32_t pin, u32_t *func);
3535

3636
#endif /* __PINMUX_GALILEO_PRIV_H */

boards/x86/quark_d2000_crb/pinmux.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* associated pins and ball points.
3131
* This is the full pinmap that we have available on the board for configuration
3232
* including the ball position and the various modes that can be set. In the
33-
* _pinmux_defaults we do not spend any time setting values that are using mode
33+
* pinmux_defaults we do not spend any time setting values that are using mode
3434
* A as the hardware brings up all devices by default in mode A.
3535
*/
3636
/* pin, ball, mode A, mode B, mode C */
@@ -64,7 +64,7 @@
6464

6565
#define PINMUX_MAX_REGISTERS 2
6666

67-
static void _pinmux_defaults(u32_t base)
67+
static void pinmux_defaults(u32_t base)
6868
{
6969
u32_t mux_config[PINMUX_MAX_REGISTERS] = { 0, 0 };
7070
int i = 0;
@@ -91,10 +91,10 @@ static int pinmux_initialize(struct device *port)
9191
{
9292
ARG_UNUSED(port);
9393

94-
_pinmux_defaults(PINMUX_BASE_ADDR);
94+
pinmux_defaults(PINMUX_BASE_ADDR);
9595

9696
/* Enable the UART RX pin to receive input */
97-
_quark_mcu_set_mux(PINMUX_BASE_ADDR + PINMUX_INPUT_OFFSET, 5, 0x1);
97+
z_quark_mcu_set_mux(PINMUX_BASE_ADDR + PINMUX_INPUT_OFFSET, 5, 0x1);
9898

9999
return 0;
100100
}

boards/x86/quark_se_c1000_devboard/pinmux.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/*
2020
* This is the full pinmap that we have available on the board for configuration
2121
* including the ball position and the various modes that can be set. In the
22-
* _pinmux_defaults we do not spend any time setting values that are using mode
22+
* pinmux_defaults we do not spend any time setting values that are using mode
2323
* A as the hardware brings up all devices by default in mode A.
2424
*/
2525

@@ -100,7 +100,7 @@
100100
* the bit description from above
101101
*/
102102
#define PINMUX_MAX_REGISTERS 5
103-
static void _pinmux_defaults(u32_t base)
103+
static void pinmux_defaults(u32_t base)
104104
{
105105
u32_t mux_config[PINMUX_MAX_REGISTERS] = { 0, 0, 0, 0, 0};
106106
int i = 0;
@@ -144,7 +144,7 @@ static int pinmux_initialize(struct device *port)
144144
{
145145
ARG_UNUSED(port);
146146

147-
_pinmux_defaults(PINMUX_BASE_ADDR);
147+
pinmux_defaults(PINMUX_BASE_ADDR);
148148

149149
return 0;
150150
}

0 commit comments

Comments
 (0)