mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-11-09 12:36:00 +03:00
cardem: Report the VCC voltage (if supported)
The SIMtrace2 protocol alwasy contained a field for the VCC voltage, the cardem firmware just never populated that field, even on those boards that use the ADC to determine its voltage. Change-Id: Idcecad553fb36380e916378e1420488acbbfa8e3
This commit is contained in:
1 parent
3a6f1adc2e
commit
20bc014b82
3 files changed
+21
-1
No files matched your search
@@ -168,6 +168,16 @@ static void card_emu_uart_set_direction(uint8_t uart_chan, bool tx)
|
||||
#endif
|
||||
}
|
||||
|
||||
int card_emu_get_vcc(uint8_t uart_chan)
|
||||
{
|
||||
struct cardem_inst *ci = &cardem_inst[uart_chan];
|
||||
#ifdef DETECT_VCC_BY_ADC
|
||||
return ci->vcc_uv / 1000;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* call-back from card_emu.c to enable/disable transmit and/or receive */
|
||||
void card_emu_uart_enable(uint8_t uart_chan, uint8_t rxtx)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user