Ejemplo n.º 1
0
char c3_open(uint8_t jr)
{
	/* In case of a reset, finish a previously started image */
	c3_finish_picture();
	
	/* Open, setup and take the image */
	if(c3_sync() != 0) return(-1);
	if(c3_setup(CT_JPEG, 0, jr) != 0) return(-2);
	if(c3_set_package_size(RXBUF_LEN) != 0) return(-3);
	if(c3_snapshot(ST_JPEG, 0) != 0) return(-4);
	if(c3_get_picture(PT_SNAPSHOT, &image_len) != 0) return(-5);
	
	image_read = 0;
	package = NULL;
	package_len = 0;
	package_id = 0;
	
	return(0);
}
Ejemplo n.º 2
0
Archivo: c328.c Proyecto: agavia/swift
char c3_close(void)
{
	c3_finish_picture();
	return(0);
}