public async Task Initialize()
{
/* perform autobauding */
await Init();
/* get version and command list */
await Get();
/* no support for get id? */
if (!Commands.Contains(STCmds.GET_ID)) {
/* throw an exception */
throw new STBootException("Command not supported");
}
/* get product id */
await GetID();
}
/* execute code */ private async Task Jump(uint address) { /* create new programming interface object */ using (var uc = new STBoot()) { /* open device */ uc.Open(portName, baudRate); /* initialize communication */ await uc.Initialize(); /* go! */ await uc.Jump(address); /* end communication */ uc.Close(); } }