static ssize_t myread(struct file*file,char *data,size_t count,loff_t *offp){ if(filp->f_flags &O_NONBLOCK) return -EAGAIN; int tmp[4]; tmp[0] =ioread32(aes_slave_reg5_addr) ;//AXI_AES_IP_mReadSlaveReg5(X_BASE,0); tmp[1] =ioread32(aes_slave_reg6_addr) ;//AAXI_AES_IP_mReadSlaveReg6(X_BASE,0); tmp[2] =ioread32(aes_slave_reg7_addr) ;//AAXI_AES_IP_mReadSlaveReg7(X_BASE,0); tmp[3] =ioread32(aes_slave_reg8_addr) ;//AAXI_AES_IP_mReadSlaveReg8(X_BASE,0); //xil_printf("%08x %08x %08x %08x\r\n",tmp[0],tmp[1],tmp[2],tmp[3]); data[3] = tmp[0] >> 24; data[2] = tmp[0] >> 16; data[1] = tmp[0] >> 8; data[0] = tmp[0]; data[7] = tmp[1] >> 24; data[6] = tmp[1] >> 16; data[5] = tmp[1] >> 8; data[4] = tmp[1]; data[11] = tmp[2] >> 24; data[10] = tmp[2] >> 16; data[9] = tmp[2] >> 8; data[8] = tmp[2]; data[15] = tmp[3] >> 24; data[14] = tmp[3] >> 16; data[13] = tmp[3] >> 8; data[12] = tmp[3]; return 0; }