/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
#include <stdint.h>
const char usbRxBuffer[] = "PARAM_POS 1 2 33.3";
int main()
{
printf("Hello World");
uint16_t axis = 0U;
uint16_t iter = 0U;
float parameter = 0.0;
#include <string.h>
if (strncmp((const char *)usbRxBuffer,"PARAM_POS",9)==0U)
{
sscanf(&usbRxBuffer[10], "%u %u %f", &axis, &iter, ¶meter);
printf("result: %d %d %f", axis, iter, parameter);
}
return 0;
}