File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
os/hal/ports/STM32/LLD/LTDCv1 Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -233,9 +233,9 @@ void ltdcInit(void) {
233233 rccResetLTDC ();
234234
235235 /* Enable the LTDC clock.*/
236- #if defined(STM32H743xx )
237- RCC -> D1CFGR = ( RCC -> D1CFGR & ~( 0x3U << 16U )) | ( 2 << 16 );
238- #else
236+ #if defined(STM32H7 )
237+ RCC -> APB3ENR |= RCC_APB3ENR_LTDCEN ; /* Enable LTDC clock. */
238+ #else defined ( STM32F4 )
239239 RCC -> DCKCFGR = (RCC -> DCKCFGR & ~RCC_DCKCFGR_PLLSAIDIVR ) | (2 << 16 ); /* /8 */
240240#endif
241241 rccEnableLTDC (false);
@@ -769,7 +769,7 @@ bool ltdcIsDitheringEnabledI(LTDCDriver *ltdcp) {
769769 osalDbgCheck (ltdcp == & LTDCD1 );
770770 (void )ltdcp ;
771771
772- #if defined(STM32H743xx )
772+ #if defined(STM32H7 )
773773 return (LTDC -> GCR & LTDC_GCR_DEN ) != 0 ;
774774#else
775775 return (LTDC -> GCR & LTDC_GCR_DTEN ) != 0 ;
@@ -809,7 +809,7 @@ void ltdcEnableDitheringI(LTDCDriver *ltdcp) {
809809 osalDbgCheckClassI ();
810810 osalDbgCheck (ltdcp == & LTDCD1 );
811811 (void )ltdcp ;
812- #if defined(STM32H743xx )
812+ #if defined(STM32H7 )
813813 LTDC -> GCR |= LTDC_GCR_DEN ;
814814#else
815815 LTDC -> GCR |= LTDC_GCR_DTEN ;
@@ -847,7 +847,7 @@ void ltdcDisableDitheringI(LTDCDriver *ltdcp) {
847847 osalDbgCheck (ltdcp == & LTDCD1 );
848848 (void )ltdcp ;
849849
850- #if defined(STM32H743xx )
850+ #if defined(STM32H7 )
851851 LTDC -> GCR &= ~LTDC_GCR_DEN ;
852852#else
853853 LTDC -> GCR &= ~LTDC_GCR_DTEN ;
Original file line number Diff line number Diff line change 2525#ifndef HAL_STM32_LTDC_H_
2626#define HAL_STM32_LTDC_H_
2727
28+ #include "hal.h"
29+
2830/**
2931 * @brief Using the LTDC driver.
3032 */
@@ -285,7 +287,6 @@ typedef struct ltdc_window_t ltdc_window_t;
285287typedef struct ltdc_frame_t ltdc_frame_t ;
286288typedef struct ltdc_laycfg_t ltdc_laycfg_t ;
287289typedef struct LTDCConfig LTDCConfig ;
288- typedef enum ltdc_state_t ltdc_state_t ;
289290typedef struct LTDCDriver LTDCDriver ;
290291
291292/**
@@ -457,7 +458,7 @@ typedef struct LTDCConfig {
457458/**
458459 * @brief LTDC driver state.
459460 */
460- typedef enum ltdc_state_t {
461+ typedef enum {
461462 LTDC_UNINIT = (0 ), /**< Not initialized.*/
462463 LTDC_STOP = (1 ), /**< Stopped.*/
463464 LTDC_READY = (2 ), /**< Ready.*/
You can’t perform that action at this time.
0 commit comments