Skip to content

Commit

Permalink
drv/ioport: use correct function namespace
Browse files Browse the repository at this point in the history
This changes pbio_ioport_reset_passive_devices() to pbdrv_ioport_reset_passive_devices().

Since the module is in the drv/ folder, the correct prefix is "pbdrv_".
  • Loading branch information
dlech committed Sep 1, 2021
1 parent aaebd29 commit 2a3669d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/pbio/drv/ioport/ioport_lpf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pbio_error_t pbdrv_ioport_get_iodev(pbio_port_id_t port, pbio_iodev_t **iodev) {
}

// Turns off power to passive (non-uart) devices
void pbio_ioport_reset_passive_devices(void) {
void pbdrv_ioport_reset_passive_devices(void) {
for (int i = 0; i < PBDRV_CONFIG_IOPORT_LPF2_NUM_PORTS; i++) {
if (ioport_devs[i].connected_type_id != PBIO_IODEV_TYPE_ID_LPF2_UNKNOWN_UART) {
pbdrv_motor_coast(i + PBDRV_CONFIG_IOPORT_LPF2_FIRST_PORT);
Expand Down
6 changes: 3 additions & 3 deletions lib/pbio/include/pbdrv/ioport.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2020 The Pybricks Authors
// Copyright (c) 2018-2021 The Pybricks Authors

/**
* @addtogroup IOPortDriver Driver: I/O Port
Expand All @@ -20,7 +20,7 @@

pbio_error_t pbdrv_ioport_get_iodev(pbio_port_id_t port, pbio_iodev_t **iodev);

void pbio_ioport_reset_passive_devices(void);
void pbdrv_ioport_reset_passive_devices(void);

#else // PBDRV_CONFIG_IOPORT

Expand All @@ -29,7 +29,7 @@ static inline pbio_error_t pbdrv_ioport_get_iodev(pbio_port_id_t port, pbio_iode
return PBIO_ERROR_NOT_SUPPORTED;
}

static inline void pbio_ioport_reset_passive_devices(void) {
static inline void pbdrv_ioport_reset_passive_devices(void) {
}

#endif // PBDRV_CONFIG_IOPORT
Expand Down
2 changes: 1 addition & 1 deletion lib/pbio/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void pbio_stop_all(void) {
pbio_light_animation_stop_all();
#endif
#if PBDRV_CONFIG_IOPORT_LPF2
pbio_ioport_reset_passive_devices();
pbdrv_ioport_reset_passive_devices();
#endif
pbio_motor_process_reset();
pbdrv_sound_stop();
Expand Down

0 comments on commit 2a3669d

Please sign in to comment.