Commit 8587020d authored by Federico Vaga's avatar Federico Vaga

sw:lib: improve load/dump documentation

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 49239d14
......@@ -482,6 +482,12 @@ int trtl_cpu_run_set(struct trtl_dev *trtl, uint32_t mask)
* @param[in] index CPU index
* @param[in] code buffer containing the CPU firmware binary code
* @param[in] length code length
*
* The CPU must be in reset mode in order to be programmed. This is
* done automatically by the driver which will leave the CPU in
* reset mode. The user must clear the reset status in order to run
* the firmware.
*
* @return the number of written byte, on error -1 and errno is
* set appropriately
*/
......@@ -516,6 +522,10 @@ int trtl_cpu_load_application_raw(struct trtl_dev *trtl,
* @param[in] index CPU index
* @param[out] code buffer containing the CPU firmware binary code
* @param[in] length code length
*
* For a reliable dump, the CPU must be in pause. This is done by
* the driver which then will set back the previous situation.
*
* @return the number of written byte, on error -1 and errno is
* set appropriately
*/
......@@ -551,6 +561,10 @@ int trtl_cpu_dump_application_raw(struct trtl_dev *trtl,
* @param[in] trtl device token
* @param[in] index CPU index
* @param[in] path path to the firmware file
*
* After extracting the data from the file, it internally uses
* trtl_cpu_load_application_raw().
*
* @return 0 on success, on error -1 and errno is set appropriately
*/
int trtl_cpu_load_application_file(struct trtl_dev *trtl,
......@@ -599,6 +613,9 @@ int trtl_cpu_load_application_file(struct trtl_dev *trtl,
* @param[in] trtl device token
* @param[in] index CPU index
* @param[in] path path to the firmware file
*
* It internally uses trtl_cpu_dump_application_raw().
*
* @return 0 on success, on error -1 and errno is set appropriately
*/
int trtl_cpu_dump_application_file(struct trtl_dev *trtl,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment