21 lines
626 B
C
21 lines
626 B
C
//
|
|
// Created by cfif on 05.07.23.
|
|
//
|
|
#include "GsmWithGnss.h"
|
|
|
|
static uint16_t Gsm_SrvSerialPortReceive(tGsmWithGnss *env, uint8_t *data, uint16_t size, uint32_t timeout) {
|
|
return SocketInterface_read(&env->socketIO, 0, data, size, timeout);
|
|
}
|
|
|
|
|
|
static uint16_t Gsm_SrvSerialPortTransmit(tGsmWithGnss *env, uint8_t *data, uint16_t size, uint32_t timeout) {
|
|
return SocketInterface_send(&env->socketIO, 0, data, size, timeout);
|
|
}
|
|
|
|
void Gsm_InitIO(tGsmWithGnss *env) {
|
|
env->srvIo.env = env;
|
|
env->srvIo.receive = (void *) Gsm_SrvSerialPortReceive;
|
|
env->srvIo.transmit = (void *) Gsm_SrvSerialPortTransmit;
|
|
}
|
|
|