FreeCalypso > hg > fc-magnetite
diff src/g23m-aci/aci/ati_fchg.c @ 562:adae731ae50d
aci3: implemented AT%VBAT command independent of FCHG
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 06 Jan 2019 22:33:33 +0000 |
parents | 9a237d51c226 |
children |
line wrap: on
line diff
--- a/src/g23m-aci/aci/ati_fchg.c Sun Jan 06 21:12:51 2019 +0000 +++ b/src/g23m-aci/aci/ati_fchg.c Sun Jan 06 22:33:33 2019 +0000 @@ -93,4 +93,17 @@ #endif /* RVM_FCHG_SWE */ +/* AT%VBAT - retrieve VBAT measurement, independent of FCHG */ +GLOBAL T_ATI_RSLT atPercentVBAT ( char *cl, UBYTE srcId ) +{ + extern USHORT *csf_return_adc(void); + USHORT *adc_conversion; + + TRACE_FUNCTION("atPercentVBAT()"); + adc_conversion = csf_return_adc(); + sprintf(g_sa, "%%VBAT: %u", adc_conversion[0]); + io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); + return ATI_CMPL; +} + #endif /* ATI_FCHG_C */