diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-08-17 00:23:07 +0300 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-08-17 00:23:07 +0300 |
| commit | 761968246f0eed96b26f1b62833e0e5080b9e781 (patch) | |
| tree | 8edce136479018816f803d8b883c1c97c700de3b /devicedeployment.h | |
| parent | 04fb9f870feffab0c13adbde1b59e531fc3f8fd7 (diff) | |
| parent | 1f684939334775303db6bd150e04b0249a79de63 (diff) | |
| download | SimpleMotionV2-master.tar.gz SimpleMotionV2-master.zip | |
# Conflicts:
# devicedeployment.c
Diffstat (limited to 'devicedeployment.h')
| -rw-r--r-- | devicedeployment.h | 10 |
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, |
