Lines Matching defs:resp

341 	uint8_t resp[16];
382 pmu_send(sc, PMU_SET_IMASK, 1, &reg, 16, resp);
386 pmu_send(sc, PMU_SYSTEM_READY, 1, cmd, 16, resp);
387 pmu_send(sc, PMU_GET_VERSION, 0, cmd, 16, resp);
702 uint8_t resp[16];
711 len = pmu_send(sc, PMU_INT_ACK, 0, NULL, 16, resp);
715 if ((len < 1) || (resp[1] == 0)) {
719 if (resp[1] & PMU_INT_ADB) {
728 if ((resp[2] & 0x0f) != (ADB_COMMAND_TALK << 2)) {
740 adb_receive_raw_packet(sc->adb_bus,resp[1],resp[2],
741 len - 3,&resp[3]);
743 if (resp[1] & PMU_INT_ENVIRONMENT) {
745 if ((resp[2] & PMU_ENV_LID_CLOSED) && (!sc->lid_closed)) {
749 else if (!(resp[2] & PMU_ENV_LID_CLOSED) && (sc->lid_closed)) {
754 if (resp[2] & PMU_ENV_POWER)
765 uint8_t packet[16], resp[16];
777 pmu_send(sc, PMU_ADB_CMD, len + 3, packet, 16, resp);
793 uint8_t resp[16];
805 pmu_send(sc, PMU_ADB_CMD, 4, cmd, 16, resp);
807 pmu_send(sc, PMU_ADB_POLL_OFF, 0, NULL, 16, resp);
851 uint8_t resp[3];
855 len = pmu_send(sc, PMU_POWER_EVENTS, 1, getcmd, 3, resp);
859 server_mode = (resp[2] & PMU_PWR_WAKEUP_AC_INSERT) ? 1 : 0;
876 setcmd[1] = resp[1];
879 pmu_send(sc, PMU_POWER_EVENTS, 3, setcmd, 2, resp);
889 uint8_t resp[16];
895 len = pmu_send(sc, PMU_SMART_BATTERY_STATE, 1, &reg, 16, resp);
906 info->state = resp[2];
908 switch (resp[1]) {
919 info->charge = resp[3];
920 info->maxcharge = resp[4];
922 info->current = (int8_t)resp[5];
923 info->voltage = resp[6];
934 info->charge = (resp[3] << 8) | resp[4];
935 info->maxcharge = (resp[5] << 8) | resp[6];
937 info->current = (int16_t)((resp[7] << 8) | resp[8]);
938 info->voltage = (resp[9] << 8) | resp[10];
942 resp[1]);
1092 uint8_t resp[16];
1096 pmu_send(sc, PMU_READ_RTC, 0, NULL, 16, resp);
1099 memcpy(&sec, &resp[1], 4);
1126 uint8_t resp[16];
1136 pmu_send(sc, PMU_CPU_SPEED, 5, sleepcmd, 16, resp);