feat(phy): add check for required clock bits during phy enable

This commit is contained in:
liuning
2026-03-09 16:54:45 +08:00
parent 3ce165d115
commit 11f962d8c7
21 changed files with 201 additions and 1 deletions
@@ -62,6 +62,18 @@ void modem_clock_module_enable(periph_module_t module);
*/
void modem_clock_module_disable(periph_module_t module);
/**
* @brief Gets the clock bitmask associated with the specified modem module.
*
* This function returns the complete set of clock-enable bits that correspond
* to @p module.
*
* @param module Target shared peripheral clock module.
*
* @return Bitmask of clock-enable bits for the given module.
*/
uint32_t modem_clock_module_bits_get(periph_module_t module);
/**
* @brief Reset the mac of modem module
*
@@ -6,6 +6,7 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "sdkconfig.h"
#include "soc/periph_defs.h"
@@ -167,6 +168,13 @@ void phy_module_enable(void);
*/
void phy_module_disable(void);
/**
* @brief Checks whether phy module has all bits in @p mask set.
*
* @return true if all bits in @p mask are set; false otherwise.
*/
bool phy_module_has_clock_bits(uint32_t mask);
#undef __PERIPH_CTRL_DEPRECATE_ATTR
#ifdef __cplusplus