Searched refs:chgdev (Results 1 – 1 of 1) sorted by relevance
/Zephyr-latest/samples/drivers/charger/src/ |
D | main.c | 14 static const struct device *chgdev = DEVICE_DT_GET(DT_NODELABEL(charger)); variable 21 if (chgdev == NULL) { in main() 26 if (!device_is_ready(chgdev)) { in main() 29 chgdev->name); in main() 33 printk("Found device \"%s\", getting charger data\n", chgdev->name); in main() 42 ret = charger_set_prop(chgdev, CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION, &val); in main() 52 ret = charger_set_prop(chgdev, CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV, &val); in main() 61 ret = charger_get_prop(chgdev, CHARGER_PROP_ONLINE, &val); in main() 71 ret = charger_charge_enable(chgdev, true); in main() 81 ret = charger_get_prop(chgdev, CHARGER_PROP_STATUS, &val); in main() [all …]
|