aboutsummaryrefslogtreecommitdiff
path: root/devicedeployment.h
diff options
context:
space:
mode:
authorTero Kontkanen <tero.kontkanen@granitedevices.fi>2017-08-17 00:23:07 +0300
committerTero Kontkanen <tero.kontkanen@granitedevices.fi>2017-08-17 00:23:07 +0300
commit761968246f0eed96b26f1b62833e0e5080b9e781 (patch)
tree8edce136479018816f803d8b883c1c97c700de3b /devicedeployment.h
parent04fb9f870feffab0c13adbde1b59e531fc3f8fd7 (diff)
parent1f684939334775303db6bd150e04b0249a79de63 (diff)
downloadSimpleMotionV2-master.tar.gz
SimpleMotionV2-master.zip
Merge remote-tracking branch 'origin/develop'HEADmaster
# Conflicts: # devicedeployment.c
Diffstat (limited to 'devicedeployment.h')
-rw-r--r--devicedeployment.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/devicedeployment.h b/devicedeployment.h
index 4ba793e..f9cfaa1 100644
--- a/devicedeployment.h
+++ b/devicedeployment.h
@@ -54,6 +54,16 @@ typedef enum
*/
LIB FirmwareUploadStatus smFirmwareUpload(const smbus smhandle, const int smaddress, const char *firmware_filename );
+/**
+ * @brief smFirmwareUpload Sets drive in firmware upgrade mode if necessary and uploads a new firmware. Call this many until it returns value 100 (complete) or a negative value (error).
+ * @param smhandle SM bus handle, must be opened before call
+ * @param smaddress Target SM device address. Can be device in DFU mode or main operating mode. For Argon, one device in a bus must be started into DFU mode by DIP switches and smaddress must be set to 255.
+ * @param fwData pointer to memory address where .gdf file contents are loaded. Note: on some architectures (such as ARM Cortex M) fwData must be aligned to nearest 4 byte boundary to avoid illegal machine instructions.
+ * @param fwDataLenght number of bytes in fwData
+ * @return Enum FirmwareUploadStatus that indicates errors or Complete status. Typecast to integer to get progress value 0-100.
+ */
+FirmwareUploadStatus smFirmwareUploadFromBuffer( const smbus smhandle, const int smaddress, smuint8 *fwData, const int fwDataLength );
+
typedef enum
{
CFGComplete=100,