I see some code that passes some structures by pointer to a function that doesn't changes the values that the pointer points to, like this one:
typedef struct __spi_handle_t {
    uint16_t  TxXferSize;  /* SPI Tx transfer size */
    uint16_t  RxXferSize;  /* SPI Rx transfer size */
    uint16_t  RxXferCount; /* SPI Rx Transfer Counter */
} spi_handle_t;
void hal_spi_init(spi_handle_t *spi_handle);
What is the point of making this rather than just passing by value?