AnsweredAssumed Answered

What is _mem_set_type() ?

Question asked by alexandrevincon on Mar 29, 2013
Latest reply on Apr 1, 2013 by alexandrevincon



I am currently using MQX 4.0 and trying to write my own I/O driver, base on TFS source code. I stumbled on this code in tfs.c :




* Function Name    : _io_tfs_install

* Returned Value   : TFS error code.

* Comments         : Initialize the Trivial File System.




uint_32 _io_tfs_install


      /*[IN] the name that should be given to tfs (ex: "C:", "TFS1:", etc..) */

      char_ptr              identifier,


      /*[IN] pointer to the first entry of the root TFS directory  */ 

      const TFS_DIR_ENTRY   *root


{ /* Body */

   uint_32                      error_code;

   TFS_DRIVE_STRUCT_PTR         drive_ptr;


   drive_ptr = _mem_alloc_system_zero( sizeof(TFS_DRIVE_STRUCT) );

   if ( drive_ptr == NULL ) {


   }/* Endif */





   error_code = _io_dev_install_ext( identifier,









   if (error_code != IO_OK) {


      drive_ptr = NULL;


      return error_code;

   } /* Endif */


   drive_ptr->IDENTIFIER = identifier;

   drive_ptr->ROOT     = root;






} /* Endbody */


I understand all of it except the call to _mem_set_type(). This function does not seem to be documented, so I don't know what it does and how I can adapt it for my own I/O driver.


It would be great if someone could give me a clue !


Best regards,