MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / get_version_firmware

Method get_version_firmware

Software/C/GoPiGo3.cpp:169–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169int GoPiGo3::get_version_firmware(char *str){
170 uint32_t value;
171 // assign error to the value returned by spi_read_32, and if not 0:
172 if(int error = spi_read_32(GPGSPI_MESSAGE_GET_FIRMWARE_VERSION, value)){
173 return error;
174 }
175 sprintf(str, "%d.%d.%d", (value / 1000000), ((value / 1000) % 1000), (value % 1000));
176 return ERROR_NONE;
177}
178
179int GoPiGo3::get_id(char *str){
180 spi_array_out[0] = Address;

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected