Difference between revisions of "Truxton start"
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...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
Initializes the Truxton library. | Initializes the Truxton library. | ||
| − | It | + | It will automatically be called by [truxton_create]] and is safe to call multiple times. |
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
void truxton_start( void ); | void truxton_start( void ); | ||
| − | </ | + | </source> |
=Sample= | =Sample= | ||
| − | + | <source 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(); | ||
} | } | ||
| − | </ | + | </source> |
Latest revision as of 04:54, 2 June 2021
Initializes the Truxton library. It will automatically be called by [truxton_create]] and is safe to call multiple times.
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();
}