Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

read the data from file using f_read in fatfs

hello , i'm trying to read my file fatfs in sdk , i have the instruction created with vivado HLS but i can't translate by my self in fatfs. some help please

this the instruction which i want to translate : 

/* Read model file */
           if( ! readModel( modelIn, example, sv, lambda, svNonZeroFeature, nonZeroFeature, target, weight, output, zeroFeatureExample, rbfConstant, degree
                    , b, numSv, numExample, kernelType, maxFeature ) ) {
              fprintf( stderr, "Error in reading model file %s\n",  mfile );
              exit (3);
           } else fclose( modelIn );
            printf("Finish reading model file\n");

Parents Reply
  • this is he readModel : 

    int readModel( FILE *in,
    Feature example[NUM_EXAMPLES][MAX_NUM_OF_FEATURES_PER_EXAMPLE],
    Feature	sv[NUM_SUPPORT_VECTORS][MAX_FEATURES_REQUIRED],
    double  lambda[NUM_SUPPORT_VECTORS],
    int svNonZeroFeature[NUM_SUPPORT_VECTORS],
    int nonZeroFeature[NUM_EXAMPLES],
    int target[NUM_EXAMPLES],
    double weight[MAX_FEATURES_READ+1],
    double output[NUM_EXAMPLES],
    int zeroFeatureExample[NUM_ZERO_FEATURE_EXAMPLES],
    double  rbfConstant,
    int degree,
    double b,
    int numSv,
    int numExample,
    int kernelType,
    int maxFeature );

Children
Related