本文整理汇总了C++中ergodox_board_led_off函数的典型用法代码示例。如果您正苦于以下问题:C++ ergodox_board_led_off函数的具体用法?C++ ergodox_board_led_off怎么用?C++ ergodox_board_led_off使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ergodox_board_led_off函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void)
{
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case FMU:
ergodox_right_led_1_on();
break;
case PMQ:
ergodox_right_led_2_on();
break;
case PMN:
ergodox_right_led_3_on();
break;
default:
if(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) {
ergodox_led_all_set(LED_BRIGHTNESS_HI);
ergodox_right_led_1_on();
}
else {
ergodox_board_led_off();
}
break;
}
};
示例2: matrix_init_user
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
ergodox_board_led_off();
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
ergodox_board_led_off();
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
ergodox_board_led_off();
};
示例3: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
case 3:
ergodox_right_led_3_on();
break;
#endif
default:
// none
break;
}
};
示例4: matrix_scan_keymap
void matrix_scan_keymap(void) { // runs frequently to update info
uint8_t modifiders = get_mods();
if (!skip_leds) {
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
// Since we're not using the LEDs here for layer indication anymore,
// then lets use them for modifier indicators. Shame we don't have 4...
// Also, no "else", since we want to know each, independantly.
if (modifiders & MODS_SHIFT_MASK) {
ergodox_right_led_2_on();
}
if (modifiders & MODS_CTRL_MASK) {
ergodox_right_led_1_on();
}
if (modifiders & MODS_ALT_MASK) {
ergodox_right_led_3_on();
}
}
};
示例5: dance_flsh_each
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
if (!skip_leds) {
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
skip_leds = true;
}
switch (state->count) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_3_on();
break;
case 4:
ergodox_right_led_1_off();
_delay_ms(50);
ergodox_right_led_2_off();
_delay_ms(50);
ergodox_right_led_3_off();
}
}
示例6: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_3_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
default:
// none
break;
}
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
// if capslk is on, set led 1 on
ergodox_right_led_1_on();
} else {
ergodox_right_led_1_off();
}
};
示例7: matrix_scan_user
// Runs constantly in the background, in a loop.
void * matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_3_on();
break;
case 4:
ergodox_right_led_1_on(); // TODO: Make a fourth layer
ergodox_right_led_3_on();
break;
default:
// none
break;
}
};
示例8: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
/* leds is a static array holding the current brightness of each of the
* three keyboard LEDs. It's 4 long simply to avoid the ugliness of +1s and
* -1s in the code below, and because wasting a byte really doesn't matter
* that much (no, it *doesn't*, stop whinging!). Note that because it's
* static it'll maintain state across invocations of this routine.
*/
static uint8_t leds[4];
uint8_t led;
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
/* Loop over each LED/layer */
for (led = 1; led <= 3; ++led) {
/* If the current layer matches the current LED, increment its
* brightness by 1 up to a maximum of 255. If the current layer doesn't
* match, decrement its brightness by 1 down to a minimum of zero.
*/
leds[led] += (layer == led) ?
(leds[led] < 255 ? 1 : 0):
(leds[led] > 0 ? -1 : 0);
/* Set LED state according to the new brightness */
if (leds[led]) {
ergodox_right_led_on(led);
ergodox_right_led_set(led, leds[led]);
}
else {
ergodox_right_led_off(led);
}
}
};
示例9: matrix_scan_keymap
void matrix_scan_keymap(void) { // runs frequently to update info
uint8_t modifiers = get_mods();
uint8_t led_usb_state = host_keyboard_leds();
uint8_t one_shot = get_oneshot_mods();
if (!skip_leds) {
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
// Since we're not using the LEDs here for layer indication anymore,
// then lets use them for modifier indicators. Shame we don't have 4...
// Also, no "else", since we want to know each, independently.
if ( ( modifiers | one_shot ) & MOD_MASK_SHIFT || led_usb_state & (1<<USB_LED_CAPS_LOCK) ) {
ergodox_right_led_2_on();
ergodox_right_led_2_set( 50 );
}
if ( ( modifiers | one_shot ) & MOD_MASK_CTRL) {
ergodox_right_led_1_on();
ergodox_right_led_1_set( 10 );
}
if ( ( modifiers | one_shot ) & MOD_MASK_ALT) {
ergodox_right_led_3_on();
ergodox_right_led_3_set( 10 );
}
}
};
示例10: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case DVORAK:
ergodox_right_led_1_on();
break;
case COLEMAK:
ergodox_right_led_2_on();
break;
case QWERTY:
ergodox_right_led_3_on();
break;
case FN:
ergodox_led_all_on();
break;
default:
// none
break;
}
};
示例11: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_3_on();
break;
case 4:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};
示例12: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (td_led_override) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// Layer 1 and 2 are both overlay layers, so they could both be on. This
// means we can't use the lazy check of checking for the first significant
// bit.
if (LAYER_ON(SYMB)) {
ergodox_right_led_1_on();
}
if (LAYER_ON(NUMP)) {
ergodox_right_led_2_on();
}
}
};
示例13: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 1:
ergodox_right_led_3_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
default:
// none
break;
}
// Turn the caps lock led on
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
ergodox_right_led_1_on();
}
}
示例14: matrix_scan_user
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_on();
ergodox_led_all_on();
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
// _delay_ms(45);
switch (layer)
{
case _SYMBOLS:
ergodox_right_led_1_on();
break;
case _MOUSE:
ergodox_right_led_2_on();
break;
case _NUMPAD:
ergodox_right_led_3_on();
break;
case _NAV:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
break;
case _MACROS:
//layer unused right now
break;
case _FUNCTION:
//layer unused right nowex
break;
case _APPSWITCH:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
case _ONESHOT:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
case _TEXTNAV:
ergodox_right_led_1_on();
ergodox_right_led_3_on();
break;
case _QWERTY_KIDS:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
case _STREET_FIGHTER:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
default:
break;
}
};
示例15: matrix_init_user
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
// AFAICT, we don't have one of these
ergodox_board_led_off();
#ifdef MOUSEKEY_ENABLE
// mousekey: A bit faster by default, use accel keys for fine control
mk_max_speed = 6;
// Slightly slower mouse wheel speed than the default
mk_wheel_max_speed = 4;
#endif
}