Skip to content

Commit d3e84f7

Browse files
committed
modem: ubx: Change request buffer to be void
So this API can be used to send frames with a different encoding than UBX. This enables UBX drivers to send RTCM3 correction frames using UBX API, without having to switch over modem pipes. Signed-off-by: Luis Ubieda <luisf@croxel.com>
1 parent c967460 commit d3e84f7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/gnss/gnss_u_blox_f9p.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static int ubx_f9p_msg_send(const struct device *dev, const struct ubx_frame *re
153153
data->script.inst.retry_count = wait_for_ack ? 2 : 0;
154154
data->script.inst.match.filter.class = wait_for_ack ? UBX_CLASS_ID_ACK : 0;
155155
data->script.inst.match.filter.id = UBX_MSG_ID_ACK;
156-
data->script.inst.request.buf = req;
156+
data->script.inst.request.buf = (const void *)req;
157157
data->script.inst.request.len = len;
158158

159159
err = modem_ubx_run_script(&data->ubx.inst, &data->script.inst);

drivers/gnss/gnss_u_blox_m8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static int ubx_m8_msg_send(const struct device *dev, const struct ubx_frame *req
153153
data->script.inst.retry_count = wait_for_ack ? 2 : 0;
154154
data->script.inst.match.filter.class = wait_for_ack ? UBX_CLASS_ID_ACK : 0;
155155
data->script.inst.match.filter.id = UBX_MSG_ID_ACK;
156-
data->script.inst.request.buf = req;
156+
data->script.inst.request.buf = (const void *)req;
157157
data->script.inst.request.len = len;
158158

159159
err = modem_ubx_run_script(&data->ubx.inst, &data->script.inst);

include/zephyr/modem/ubx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct modem_ubx_match {
5353

5454
struct modem_ubx_script {
5555
struct {
56-
const struct ubx_frame *buf;
56+
const void *buf;
5757
uint16_t len;
5858
} request;
5959
struct {

0 commit comments

Comments
 (0)