STBootLib.STBoot.Initialize C# (CSharp) Méthode

Initialize() public méthode

public Initialize ( ) : Task
Résultat Task
        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();
        }

Usage Example

Exemple #1
0
 /* 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();
     }
 }
All Usage Examples Of STBootLib.STBoot::Initialize