![]()  | 
  
    ckb-next
    beta-v0.2.8 at branch testing
    
   ckb-next driver for corsair devices 
   | 
 
#include "command.h"#include "device.h"#include "firmware.h"#include "profile.h"#include "usb.h"
 Include dependency graph for device.c:Go to the source code of this file.
Functions | |
| int | _start_dev (usbdevice *kb, int makeactive) | 
| int | start_dev (usbdevice *kb, int makeactive) | 
Variables | |
| int | hwload_mode = 1 | 
| hwload_mode = 1 means read hardware once. should be enough  More... | |
| usbdevice | keyboard [9] | 
| remember all usb devices. Needed for closeusb().  More... | |
| pthread_mutex_t | devlistmutex = PTHREAD_MUTEX_INITIALIZER | 
| pthread_mutex_t | devmutex [9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } | 
| Mutex for handling the usbdevice structure.  More... | |
| pthread_mutex_t | inputmutex [9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } | 
| Mutex for dealing with usb input frames.  More... | |
| pthread_mutex_t | macromutex [9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } | 
| Protecting macros against lightning: Both use usb_send.  More... | |
| pthread_mutex_t | macromutex2 [9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } | 
| Protecting the single link list of threads and the macrovar.  More... | |
| pthread_cond_t | macrovar [9] = { [0 ... 9 -1] = PTHREAD_COND_INITIALIZER } | 
| This variable is used to stop and wakeup all macro threads which have to wait.  More... | |
| int _start_dev | ( | usbdevice * | kb, | 
| int | makeactive | ||
| ) | 
_start_dev get fw-info and pollrate; if available, install new firmware; get all hardware profiles.
| kb | the normal kb pointer to the usbdevice. Is also valid for mice. | 
| makeactive | if set to 1, activate the device via setactive() | 
Definition at line 25 of file device.c.
References usbdevice::active, ckb_info, ckb_warn, FEAT_ADJRATE, FEAT_FWUPDATE, FEAT_FWVERSION, FEAT_HWLOAD, FEAT_POLLRATE, FEAT_RGB, usbdevice::features, usbdevice::fwversion, getfwversion(), HAS_FEATURES, usbdevice::hw, hwload_mode, hwloadprofile, NEEDS_FW_UPDATE, usbdevice::pollrate, and setactive.
Referenced by start_dev().
 Here is the call graph for this function:
 Here is the caller graph for this function:| int start_dev | ( | usbdevice * | kb, | 
| int | makeactive | ||
| ) | 
Definition at line 80 of file device.c.
References _start_dev(), USB_DELAY_DEFAULT, and usbdevice::usbdelay.
 Here is the call graph for this function:| pthread_mutex_t devmutex[9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } | 
Definition at line 12 of file device.c.
Referenced by _updateconnected(), quitWithLock(), and usb_rm_device().
| int hwload_mode = 1 | 
hwload_mode is defined in device.c
Definition at line 7 of file device.c.
Referenced by _start_dev(), _usbrecv(), _usbsend(), and main().
| pthread_mutex_t inputmutex[9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } | 
| usbdevice keyboard[9] | 
Definition at line 10 of file device.c.
Referenced by _mkdevpath(), _mknotifynode(), _rmnotifynode(), _setupusb(), _updateconnected(), closeusb(), main(), mkfwnode(), os_closeusb(), os_inputmain(), os_inputopen(), os_setupusb(), quitWithLock(), rmdevpath(), usb_rm_device(), and usbadd().
| pthread_mutex_t macromutex[9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } | 
| pthread_mutex_t macromutex2[9] = { [0 ... 9 -1] = PTHREAD_MUTEX_INITIALIZER } |