@@ -67,6 +67,7 @@ typedef enum _flexio_timer_mode
67
67
kFLEXIO_TimerModeDual8BitBaudBit = 0x1U , /*!< Dual 8-bit counters baud/bit mode. */
68
68
kFLEXIO_TimerModeDual8BitPWM = 0x2U , /*!< Dual 8-bit counters PWM mode. */
69
69
kFLEXIO_TimerModeSingle16Bit = 0x3U , /*!< Single 16-bit counter mode. */
70
+ kFLEXIO_TimerModeDual8BitPWMLow = 0x6U , /*!< Dual 8-bit counters PWM Low mode. */
70
71
} flexio_timer_mode_t ;
71
72
72
73
/*! @brief Define type of timer initial output or timer reset condition.*/
@@ -239,7 +240,9 @@ typedef enum _flexio_shifter_buffer_type
239
240
typedef struct _flexio_config_
240
241
{
241
242
bool enableFlexio ; /*!< Enable/disable FlexIO module */
243
+ #if !(defined(FSL_FEATURE_FLEXIO_HAS_DOZE_MODE_SUPPORT ) && (FSL_FEATURE_FLEXIO_HAS_DOZE_MODE_SUPPORT == 0 ))
242
244
bool enableInDoze ; /*!< Enable/disable FlexIO operation in doze mode */
245
+ #endif
243
246
bool enableInDebug ; /*!< Enable/disable FlexIO operation in debug mode */
244
247
bool enableFastAccess ; /*!< Enable/disable fast access to FlexIO registers, fast access requires
245
248
the FlexIO clock to be at least twice the frequency of the bus clock. */
@@ -895,6 +898,50 @@ static inline uint32_t FLEXIO_GetPinStatus(FLEXIO_Type *base, uint32_t pin)
895
898
return (((base -> PINSTAT ) >> pin ) & 0x01U );
896
899
}
897
900
901
+ /*!
902
+ * @brief Sets the FLEXIO output pin level.
903
+ *
904
+ * @param base FlexIO peripheral base address
905
+ * @param pin FlexIO pin number.
906
+ * @param level FlexIO output pin level to set, can be either 0 or 1.
907
+ */
908
+ static inline void FLEXIO_SetPinLevel (FLEXIO_Type * base , uint8_t pin , bool level )
909
+ {
910
+ base -> PINOUTD =
911
+ (base -> PINOUTD & ~((uint32_t )((uint32_t )1U << pin ))) |
912
+ (FLEXIO_PINOUTD_OUTD ((uint32_t )((true == level )
913
+ ? (uint32_t )0x1U : (uint32_t )0x0U ) << pin ));
914
+ }
915
+
916
+ /*!
917
+ * @brief Gets the enabled status of a FLEXIO output pin.
918
+ *
919
+ * @param base FlexIO peripheral base address
920
+ * @param pin FlexIO pin number.
921
+ * @retval FlexIO port enabled status
922
+ * - 0: corresponding output pin is in disabled state.
923
+ * - 1: corresponding output pin is in enabled state.
924
+ */
925
+ static inline bool FLEXIO_GetPinOverride (const FLEXIO_Type * const base , uint8_t pin )
926
+ {
927
+ return ((base -> PINOUTE & (uint32_t )((uint32_t )1U << pin )) != 0UL );
928
+ }
929
+
930
+ /*!
931
+ * @brief Enables or disables a FLEXIO output pin.
932
+ *
933
+ * @param base FlexIO peripheral base address
934
+ * @param pin Flexio pin number.
935
+ * @param enabled Enable or disable the FlexIO pin.
936
+ */
937
+ static inline void FLEXIO_ConfigPinOverride (FLEXIO_Type * base , uint8_t pin , bool enabled )
938
+ {
939
+ base -> PINOUTE =
940
+ (base -> PINOUTE & ~((uint32_t )((uint32_t )1U << pin ))) |
941
+ FLEXIO_PINOUTE_OUTE ((uint32_t )((true == enabled )
942
+ ? (uint32_t )0x1U : (uint32_t )0x0U ) << pin );
943
+ }
944
+
898
945
/*!
899
946
* @brief Clears the multiple FLEXIO input pins status.
900
947
*
0 commit comments