From 11c62917707c1c6fc69d095f40dc3e53eaef9574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sat, 15 Apr 2017 02:50:03 +0200 Subject: [PATCH] Remove pinxmux_type_t and PeripheralDescriptor.pinmuxConfig --- right/src/buspal/bl_peripheral.h | 23 ++++++----------------- right/src/buspal/bus_pal_hardware.c | 1 - 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/right/src/buspal/bl_peripheral.h b/right/src/buspal/bl_peripheral.h index 4e27791..85292ff 100644 --- a/right/src/buspal/bl_peripheral.h +++ b/right/src/buspal/bl_peripheral.h @@ -8,24 +8,16 @@ //! flash region to list available peripherals and control which peripherals are enabled. enum _peripheral_types { - kPeripheralType_UART = (1 << 0), + kPeripheralType_UART = (1 << 0), kPeripheralType_I2CSlave = (1 << 1), kPeripheralType_SPISlave = (1 << 2), - kPeripheralType_CAN = (1 << 3), - kPeripheralType_USB_HID = (1 << 4), - kPeripheralType_USB_CDC = (1 << 5), - kPeripheralType_USB_DFU = (1 << 6), - kPeripheralType_USB_MSC = (1 << 7) + kPeripheralType_CAN = (1 << 3), + kPeripheralType_USB_HID = (1 << 4), + kPeripheralType_USB_CDC = (1 << 5), + kPeripheralType_USB_DFU = (1 << 6), + kPeripheralType_USB_MSC = (1 << 7), }; -//! @brief Pinmux types. -typedef enum _pinmux_types -{ - kPinmuxType_Default = 0, - kPinmuxType_GPIO = 1, - kPinmuxType_Peripheral = 2 -} pinmux_type_t; - // Forward declaration. typedef struct PeripheralDescriptor peripheral_descriptor_t; @@ -84,9 +76,6 @@ struct PeripheralDescriptor //! @brief The instance number of the peripheral. uint32_t instance; - //! @brief Configure pinmux setting for the peripheral. - void (*pinmuxConfig)(uint32_t instance, pinmux_type_t pinmux); - //! @brief Control interface for the peripheral. const peripheral_control_interface_t *controlInterface; diff --git a/right/src/buspal/bus_pal_hardware.c b/right/src/buspal/bus_pal_hardware.c index 861888c..e104548 100644 --- a/right/src/buspal/bus_pal_hardware.c +++ b/right/src/buspal/bus_pal_hardware.c @@ -32,7 +32,6 @@ const peripheral_descriptor_t g_peripherals[] = { // USB HID - Full speed {.typeMask = kPeripheralType_USB_HID, .instance = 0, - .pinmuxConfig = NULL, .controlInterface = &g_usbHidControlInterface, .byteInterface = NULL, .packetInterface = &g_usbHidPacketInterface },