Parameter added to the saveFrame function and documentation changed.
This commit is contained in:
parent
5f6d77dd0c
commit
a21430078f
3 changed files with 4 additions and 17 deletions
|
@ -84,7 +84,7 @@ void sinus1(int max)
|
||||||
// or save the frame to eeprom
|
// or save the frame to eeprom
|
||||||
//tmp = tmp + (k << 27);
|
//tmp = tmp + (k << 27);
|
||||||
//if (k < 32)
|
//if (k < 32)
|
||||||
//lc_saveFrame(tmp, k);
|
//lc_saveFrame(tmp, k, k);
|
||||||
|
|
||||||
usleep(2500);
|
usleep(2500);
|
||||||
k++;
|
k++;
|
||||||
|
|
|
@ -42,21 +42,6 @@ int lc_setMode(int mode)
|
||||||
return usb_control_msg(_lc_handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, CUSTOM_RQ_SET_MODE, mode, 0, _lc_buffer, 0, 300);
|
return usb_control_msg(_lc_handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, CUSTOM_RQ_SET_MODE, mode, 0, _lc_buffer, 0, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief The saveFrame function.
|
|
||||||
* \param frame The 32bit frame data. Bit 0-8 equals layer one; bit 9 - 17 euqals layer two; bit 18 - 26 equals layer three. the 5 MSB is the lifetime of the current frame in ISR calls (300Hz).
|
|
||||||
* \param index The position in the EEPROM (0 to 31) of the internal animation content.
|
|
||||||
* \return NOT_CONNECTED_ERROR or the return value of the usb_control_msg function.
|
|
||||||
*/
|
|
||||||
int lc_saveFrame(unsigned long frame, int index)
|
|
||||||
{
|
|
||||||
if (_lc_handle == NULL)
|
|
||||||
return NOT_CONNECTED_ERROR;
|
|
||||||
|
|
||||||
lc_setFrame(frame);
|
|
||||||
|
|
||||||
return usb_control_msg(_lc_handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, CUSTOM_RQ_EEPROM_STORE_FRAME, 0, index, _lc_buffer, 0, 300);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! \brief The saveFrame function.
|
/*! \brief The saveFrame function.
|
||||||
* \param frame The 32bit frame data. Bit 0-8 equals layer one; bit 9 - 17 euqals layer two; bit 18 - 26 equals layer three. The 5 MSB is the lifetime of the current frame in ISR calls (300Hz) multiplied by 8.
|
* \param frame The 32bit frame data. Bit 0-8 equals layer one; bit 9 - 17 euqals layer two; bit 18 - 26 equals layer three. The 5 MSB is the lifetime of the current frame in ISR calls (300Hz) multiplied by 8.
|
||||||
* \param deay The lifetime (onyl 5 bits) of the given frame in ISR calls multiplied by 8.
|
* \param deay The lifetime (onyl 5 bits) of the given frame in ISR calls multiplied by 8.
|
||||||
|
@ -68,6 +53,8 @@ int lc_saveFrame(unsigned long frame, int delay, int index)
|
||||||
if (_lc_handle == NULL)
|
if (_lc_handle == NULL)
|
||||||
return NOT_CONNECTED_ERROR;
|
return NOT_CONNECTED_ERROR;
|
||||||
|
|
||||||
|
frame = frame + (delay << 27);
|
||||||
|
|
||||||
lc_setFrame(frame);
|
lc_setFrame(frame);
|
||||||
|
|
||||||
return usb_control_msg(_lc_handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, CUSTOM_RQ_EEPROM_STORE_FRAME, 0, index, _lc_buffer, 0, 300);
|
return usb_control_msg(_lc_handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, CUSTOM_RQ_EEPROM_STORE_FRAME, 0, index, _lc_buffer, 0, 300);
|
||||||
|
|
|
@ -41,7 +41,7 @@ int _lc_vid,
|
||||||
|
|
||||||
int lc_setFrame(unsigned long);
|
int lc_setFrame(unsigned long);
|
||||||
int lc_setMode(int);
|
int lc_setMode(int);
|
||||||
int lc_saveFrame(unsigned long, int);
|
int lc_saveFrame(unsigned long, int, int);
|
||||||
int lc_init(void);
|
int lc_init(void);
|
||||||
int lc_close(void);
|
int lc_close(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue