blob: 97493a05390d977c3f93863c218a1df74064eb74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <survive.h>
#include "survive_internal.h"
#include <stdio.h>
#include <stdlib.h>
struct SurviveContext * survive_init( void(*ff)( struct SurviveContext * ctx, const char * fault ), void(*notefunction)( struct SurviveContext * ctx, const char * note ) )
{
int r = 0;
struct SurviveContext * ret = calloc( 1, sizeof( struct SurviveContext ) );
ret->faultfunction = ff;
ret->notefunction = notefunction;
if( r = survive_usb_init( ret ) )
{
return 0;
}
ret->headset.sensors = 32;
ret->headset.ctx = ret;
//ret->headset->photos = malloc( ret->headset->sensors * sizeof(struct SurvivePhoto) );
return ret;
}
void survive_close( struct SurviveContext * ctx )
{
survive_usb_close( ctx );
}
int survive_poll( struct SurviveContext * ctx )
{
survive_usb_poll( ctx );
}
|