This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I have a problem!!!

Hello.

This is my code to "wait until micro sd card is pluged".

while(1)
{
	disk_state =disk_initialize(0); 
	if(disk_state==RES_OK) 
	{
		NRF_LOG_INFO("Initialize Successful \r\n");
		break;
	}
	else
	{
		disk_uninitialize(0);
		disk_state = STA_NOINIT;
		diskio_blkdev_t drives[] =
		{
			DISKIO_BLOCKDEV_CONFIG(NRF_BLOCKDEV_BASE_ADDR(m_block_dev_sdc, block_dev), NULL)
		};
		diskio_blockdev_register(drives, ARRAY_SIZE(drives));
		NRF_LOG_INFO("ReInit one more time\r\n");
		delay();
	}
}

But It seems not work. Have any idea for me ?

Parents Reply Children
No Data
Related