本文整理汇总了C++中ergodox_right_led_1_off函数的典型用法代码示例。如果您正苦于以下问题:C++ ergodox_right_led_1_off函数的具体用法?C++ ergodox_right_led_1_off怎么用?C++ ergodox_right_led_1_off使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ergodox_right_led_1_off函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dance_flsh_reset
// if the flash state didnt happen, then turn off leds, left to right
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
_delay_ms(200);
ergodox_right_led_3_off();
_delay_ms(200);
ergodox_right_led_2_off();
_delay_ms(200);
ergodox_right_led_1_off();
_delay_ms(500);
skip_leds = false;
}
示例2: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
if(layer == 1)
{
ergodox_right_led_2_on();
ergodox_right_led_3_on();
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
}
if(capsOn)
{
ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
ergodox_right_led_1_on ();
}
if(keyboard_report->mods & MOD_BIT(KC_LSFT))
{
ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
ergodox_right_led_1_on ();
} else {
ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
if(!capsOn)
{
ergodox_right_led_1_off ();
}
}
if(keyboard_report->mods & MOD_BIT(KC_LALT))
{
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
ergodox_right_led_2_on ();
} else {
ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
if(layer != 1)
{
ergodox_right_led_2_off ();
}
}
if(keyboard_report->mods & MOD_BIT(KC_LCTRL))
{
ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
ergodox_right_led_3_on ();
} else {
ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
if(layer != 1)
{
ergodox_right_led_3_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();
/* ergodox_left_led_1_on(); */
break;
case 2:
ergodox_right_led_2_on();
/* ergodox_left_led_2_on(); */
break;
case 3:
ergodox_right_led_3_on();
/* ergodox_left_led_3_on(); */
break;
case 4:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
/* ergodox_left_led_1_on(); */
/* ergodox_left_led_2_on(); */
break;
case 5:
ergodox_right_led_1_on();
ergodox_right_led_3_on();
/* ergodox_left_led_1_on(); */
/* ergodox_left_led_3_on(); */
break;
case 6:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
/* ergodox_left_led_2_on(); */
/* ergodox_left_led_3_on(); */
break;
case 7:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
/* ergodox_left_led_1_on(); */
/* ergodox_left_led_2_on(); */
/* ergodox_left_led_3_on(); */
break;
default:
break;
}
};
示例4: matrix_scan_user
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint32_t layer0 = layer_state & (1UL << 0),
layer1 = layer_state & (1UL << 1),
layer2 = layer_state & (1UL << 2),
layer3 = layer_state & (1UL << 3);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
if (layer1) ergodox_right_led_1_on();
if (layer2) ergodox_right_led_2_on();
if (layer3) ergodox_right_led_3_on();
};
示例5: matrix_scan_user
// light up leds based on the layer
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
switch(layer) {
case SYSCTL:
ergodox_right_led_3_on();
break;
case MOUSE:
ergodox_right_led_2_on();
break;
default:
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
break;
}
}
示例6: ergodox_blink_all_leds
void ergodox_blink_all_leds(void)
{
ergodox_led_all_off();
ergodox_led_all_set(LED_BRIGHTNESS_HI);
ergodox_right_led_1_on();
_delay_ms(50);
ergodox_right_led_2_on();
_delay_ms(50);
ergodox_right_led_3_on();
_delay_ms(50);
ergodox_right_led_1_off();
_delay_ms(50);
ergodox_right_led_2_off();
_delay_ms(50);
ergodox_right_led_3_off();
//ergodox_led_all_on();
//_delay_ms(333);
ergodox_led_all_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();
switch (layer) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};
示例8: 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 SYMB:
ergodox_right_led_1_on();
break;
case PLVR:
ergodox_right_led_2_on();
break;
case ARRW:
ergodox_right_led_3_on();
break;
default:
break;
}
};
示例9: flash_each_tap
// flash keyboard on 4x tap, with leds
void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
ergodox_right_led_3_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_1_on();
break;
case 4:
ergodox_right_led_3_off();
wait_ms(50);
ergodox_right_led_2_off();
wait_ms(50);
ergodox_right_led_1_off();
break;
}
}
示例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 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_ONE_KEY(KC_W) {
register_code(KC_LALT);
register_code(KC_F4);
unregister_code(KC_F4);
unregister_code(KC_LALT);
}
SEQ_ONE_KEY(KC_O) {
register_code(KC_LCTL);
register_code(KC_LSFT);
register_code(KC_O);
unregister_code(KC_O);
unregister_code(KC_LSFT);
unregister_code(KC_LCTL);
}
}
}
示例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 SYMB:
ergodox_right_led_1_on();
break;
case MACR:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};
示例12: process_record_user
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
break;
case QWRTY:
if (record->event.pressed) {
set_single_persistent_default_layer(QWERTY);
}
return false;
break;
case CLMK:
if (record->event.pressed) {
set_single_persistent_default_layer(COLEMAK);
}
return false;
break;
case KC_CAPS:
if (record->event.pressed) {
// Turn LED1 On/Off for Caps Lock
if (CAPS_LED) {
ergodox_right_led_1_off();
CAPS_LED = false;
} else {
ergodox_right_led_1_on();
CAPS_LED = true;
}
}
return true;
break;
}
return true;
};
示例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 FMU:
ergodox_right_led_1_on();
break;
case PMQ:
ergodox_right_led_2_on();
break;
case PMN:
ergodox_right_led_3_on();
break;
default:
ergodox_board_led_off();
break;
}
};
示例14: matrix_scan_user
void matrix_scan_user(void)
{
uint8_t layer = biton32(layer_state);
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) &&
!has_oneshot_mods_timed_out()))
{
ergodox_right_led_1_set(LED_BRIGHTNESS_HI);
ergodox_right_led_1_on();
}
else if (layer == RAISE || layer == AUX)
{
ergodox_right_led_1_set(LED_BRIGHTNESS_LO);
ergodox_right_led_1_on();
}
else
{
ergodox_right_led_1_off();
}
if (keyboard_report->mods & MOD_BIT(KC_LCTL) ||
((get_oneshot_mods() & MOD_BIT(KC_LCTL)) &&
!has_oneshot_mods_timed_out()))
{
ergodox_right_led_2_set(LED_BRIGHTNESS_HI);
ergodox_right_led_2_on();
}
else if (layer == LOWER || layer == AUX)
{
ergodox_right_led_2_set(LED_BRIGHTNESS_LO);
ergodox_right_led_2_on();
}
else
{
ergodox_right_led_2_off();
}
if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
((get_oneshot_mods() & MOD_BIT(KC_LALT)) &&
!has_oneshot_mods_timed_out()))
{
ergodox_right_led_3_set(LED_BRIGHTNESS_HI);
ergodox_right_led_3_on();
}
else if (layer == COLE || layer == AUX)
{
ergodox_right_led_3_set(LED_BRIGHTNESS_LO);
ergodox_right_led_3_on();
}
else
{
ergodox_right_led_3_off();
}
LEADER_DICTIONARY()
{
leading = false;
leader_end();
SEQ_THREE_KEYS(KC_W, KC_I, KC_N) { os_type = OS_WIN; };
SEQ_THREE_KEYS(KC_O, KC_S, KC_X) { os_type = OS_OSX; };
SEQ_THREE_KEYS(KC_L, KC_I, KC_N) { os_type = OS_LIN; };
SEQ_ONE_KEY(KC_A)
{
switch (os_type)
{
case OS_WIN:
tap(KC_NLCK);
register_code(KC_RALT);
tap(KC_KP_0);
tap(KC_KP_2);
tap(KC_KP_2);
tap(KC_KP_8);
unregister_code(KC_RALT);
tap(KC_NLCK);
break;
case OS_OSX:
register_code(KC_RALT);
register_code(KC_RSFT);
register_code(KC_SCLN);
unregister_code(KC_SCLN);
unregister_code(KC_RSFT);
unregister_code(KC_RALT);
tap(KC_A);
break;
case OS_LIN:
tap(KC_RALT);
tap(KC_DQT);
tap(KC_A);
break;
}
}
SEQ_TWO_KEYS(KC_A, KC_A)
{
switch (os_type)
{
case OS_WIN:
//.........这里部分代码省略.........
示例15: layer_state_set_user
// Runs whenever there is a layer state change.
uint32_t layer_state_set_user(uint32_t state) {
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
uint8_t layer = biton32(state);
switch (layer) {
case 0:
#ifdef RGBLIGHT_COLOR_LAYER_0
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
#else
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
#endif
break;
case 1:
ergodox_right_led_1_on();
#ifdef RGBLIGHT_COLOR_LAYER_1
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
#endif
break;
case 2:
ergodox_right_led_2_on();
#ifdef RGBLIGHT_COLOR_LAYER_2
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
#endif
break;
case 3:
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_3
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
#endif
break;
case 4:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
#ifdef RGBLIGHT_COLOR_LAYER_4
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
#endif
break;
case 5:
ergodox_right_led_1_on();
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_5
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
#endif
break;
case 6:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_6
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
#endif
break;
case 7:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_7
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
#endif
break;
default:
break;
}
return state;
};