I'm working on a school project using SIM7000E and i'm exploring the DAM.
I was going through uart.c code and my mind blocked on this piece of code, if someone could explain me(im fairly new around here), i would apreciate it very much.
Here is the code(in file uart.c, uart_init() function, Lines 61 to 64):
uart_context_t mctx = (uart_context_t)cfg->buf;
mctx->sendbuf = (char*)cfg->buf + sizeof(struct uart_context_s);
mctx->send_buf_len = cfg->buf_len - sizeof(struct uart_context_s);
mctx->is_off = false;
I'm working on a school project using SIM7000E and i'm exploring the DAM.
I was going through uart.c code and my mind blocked on this piece of code, if someone could explain me(im fairly new around here), i would apreciate it very much.
Here is the code(in file uart.c, uart_init() function, Lines 61 to 64):
uart_context_t mctx = (uart_context_t)cfg->buf;mctx->sendbuf = (char*)cfg->buf + sizeof(struct uart_context_s);mctx->send_buf_len = cfg->buf_len - sizeof(struct uart_context_s);mctx->is_off = false;