/* Check whether the specified SPI state flag is set or not.  */
flag_status_t spi_get_status(ald_spi_handle_t *hperh, ald_spi_status_t status)
/* Check whether the specified SPI state flag is set or not.  */
flag_status_t spi_get_status(ald_spi_handle_t *hperh, ald_spi_status_t status)
{
    assert_param(IS_SPI(hperh->perh));
    assert_param(IS_SPI_STATUS(status));
    if (hperh->perh->STAT & status)
        return SET;
    return RESET;
}