void bsp_myread(PRUICSS_Handle pruIcssHandle, uint8_t *pdata, uint16_t address,
              uint16_t len)
{
    uint8_t *pEsc = (uint8_t *)(((PRUICSS_HwAttrs *)(
                                     pruIcssHandle->hwAttrs))->baseAddr + PRUICSS_SHARED_RAM);
    uint8_t *d = pdata;
    const uint8_t *s = &pEsc[address];
    int c = len, remainder = 4 - ((long)s & 3);
    if (remainder != 0 && c >= remainder)
    {
        while (remainder)
        {
            *d = *s;
            d++;
            s++;
            remainder--;
        }
        c -= remainder;
    }
    while (c>=4)
    {
        *(uint32_t*)d = *(uint32_t*)s;
        d+=4;
        s+=4;
        c-=4;
    }
    while (c)
    {
        *d = *s;
        d++;
        s++;
        c--;
    }
}