MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_regulator_is_enabled

Function rt_regulator_is_enabled

components/drivers/regulator/regulator.c:336–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336rt_bool_t rt_regulator_is_enabled(struct rt_regulator *reg)
337{
338 if (!reg)
339 {
340 return -RT_EINVAL;
341 }
342
343 if (reg->reg_np->ops->is_enabled)
344 {
345 return reg->reg_np->ops->is_enabled(reg->reg_np);
346 }
347
348 return rt_atomic_load(&reg->reg_np->enabled_count) > 0;
349}
350
351static rt_err_t regulator_set_voltage(struct rt_regulator_node *reg_np, int min_uvolt, int max_uvolt)
352{

Callers 2

rt_regulator_enableFunction · 0.85
rt_regulator_disableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected