Difference between revisions of "Truxton start"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "Initializes the Truxton library. It should be called before any other method. =Syntax= <syntaxhighlight lang="C"> void truxton_start( void ); </syntaxhighlight> =Sample= <s...")
 
Line 3: Line 3:
  
 
=Syntax=
 
=Syntax=
<syntaxhighlight lang="C">
+
<source lang="C">
 
void truxton_start( void );
 
void truxton_start( void );
</syntaxhighlight>
+
</source>
  
 
=Sample=
 
=Sample=
 
+
<source lang="C" highlight="5">
<syntaxhighlight lang="C" highlight="5">
 
 
void main()
 
void main()
 
{
 
{
Line 18: Line 17:
 
     uint64_t truxton = truxton_create();
 
     uint64_t truxton = truxton_create();
  
     truxton_get_version(truxton, version, sizeof(version));
+
     truxton_get_version( truxton, version, sizeof(version) );
  
     printf("%s\n", version);
+
     printf( "%s\n", version );
  
     truxton_destroy(truxton);
+
     truxton_destroy( truxton );
  
 
     truxton_stop();
 
     truxton_stop();
 
}
 
}
</syntaxhighlight>
+
</source>

Revision as of 11:02, 10 February 2021

Initializes the Truxton library. It should be called before any other method.

Syntax

void truxton_start( void );

Sample

void main()
{
    char version[256];

    truxton_start();

    uint64_t truxton = truxton_create();

    truxton_get_version( truxton, version, sizeof(version) );

    printf( "%s\n", version );

    truxton_destroy( truxton );

    truxton_stop();
}