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

How can I use the FDS module?

In fact,there is a demo on internet, and I test it ,but I found that the event is not reliable! my code is :

static void my_fds_evt_handler(fds_evt_t const * const p_fds_evt)
{
    switch (p_fds_evt->id)
    {
        case FDS_EVT_INIT:
            if (p_fds_evt->result == FDS_SUCCESS)
            {
                //FDS初始化成功
                printf("FDS 初始化成功!\r\n");
							  //printf("\r\n");
							  fds_init_flag = 1;
            }
            break;
				case FDS_EVT_WRITE:
					   printf("FDS 数据写事件!\r\n"); 
					if (p_fds_evt->result == FDS_SUCCESS)
						{
							  write_flag=1;
						}
						break;
			  case FDS_EVT_UPDATE:
					  printf("FDS 数据更新事件!\r\n"); 
					  break;
				case FDS_EVT_DEL_RECORD:
					  printf("FDS 删除记录事件!\r\n"); 
					  break;
				case FDS_EVT_DEL_FILE:
					  printf("FDS 删除文件事件!\r\n");
					  break;
				case FDS_EVT_GC:
					  printf("FDS FDS_EVT_GC!\r\n");
					  break;
        default:
            break;
    }
}

But all events can not enter! I spend so much time to solve this problem, my brothers,I need your hand and thanks very much!

Related