/* param base LPSPI peripheral base address. return LPSPI instance.  */
uint32_t LPSPI_GetInstance(LPSPI_Type *base)
/* param base LPSPI peripheral base address. return LPSPI instance.  */
uint32_t LPSPI_GetInstance(LPSPI_Type *base)
{
    uint8_t instance = 0;
    for (instance = 0; instance < ARRAY_SIZE(s_lpspiBases); instance++)
    {
        if (s_lpspiBases[instance] == base)
        {
            break;
        }
    }
    assert(instance < ARRAY_SIZE(s_lpspiBases));
    return instance;
}