Skip to content

Commit a4f658b

Browse files
bogdanovsjpanisbl
authored andcommitted
simplelink_lpf3: ti: devices: cc23x0r5: Extend GPIO functionality
Add GPIOSetConfigDio and GPIOGetConfigDio. Extension is needed to make zephyr driver consistent. Signed-off-by: Stoyan Bogdanov <[email protected]>
1 parent 7042e60 commit a4f658b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

simplelink_lpf3/source/ti/devices/cc23x0r5/driverlib/gpio.h

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,46 @@ __STATIC_INLINE void GPIOClearEventMultiDio(uint32_t dioMask)
581581
HWREG( GPIO_BASE + GPIO_O_ICLR ) = dioMask;
582582
}
583583

584+
//*****************************************************************************
585+
//
586+
//! \brief Set configuration to DIO.
587+
//!
588+
//! \param iocfgRegAddr is address where config should be written
589+
//! \param config is the configuration to be written
590+
//! \return None
591+
//!
592+
//! \sa \ref GPIOGetConfigDio()
593+
//
594+
//*****************************************************************************
595+
__STATIC_INLINE void GPIOSetConfigDio(uint32_t iocfgRegAddr, uint32_t config)
596+
{
597+
// Check the arguments.
598+
ASSERT(iocfgRegAddr);
599+
600+
// Set the specified DIO config.
601+
HWREG( iocfgRegAddr ) = config;
602+
}
603+
604+
//*****************************************************************************
605+
//
606+
//! \brief Get configuration for DIO.
607+
//!
608+
//! \param iocfgRegAddr is address from where config should be read
609+
//!
610+
//! \return Raw register value
611+
//!
612+
//! \sa \ref GPIOSetConfigDio()
613+
//
614+
//*****************************************************************************
615+
__STATIC_INLINE uint32_t GPIOGetConfigDio(uint32_t iocfgRegAddr)
616+
{
617+
// Check the arguments.
618+
ASSERT(iocfgRegAddr);
619+
620+
// Return Raw register value.
621+
return HWREG( iocfgRegAddr );
622+
}
623+
584624
//*****************************************************************************
585625
//
586626
// Mark the end of the C bindings section for C++ compilers.

0 commit comments

Comments
 (0)