forked from SonixQMK/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from dexter93/sn32_rgb_v3
Sn32 rgb v3
- Loading branch information
Showing
22 changed files
with
387 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
264 changes: 210 additions & 54 deletions
264
drivers/led/sn32/rgb_matrix_sn32f24xb.c → drivers/led/sn32/rgb_matrix_sn32f2xx.c
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
#include <stdbool.h> | ||
|
||
#if defined(RGB_MATRIX_SN32F2XX) | ||
# define SN32F2XX_LED_COUNT RGB_MATRIX_LED_COUNT | ||
#endif | ||
|
||
#if !defined(SN32_PWM_OUTPUT_ACTIVE_LEVEL) | ||
# define SN32_PWM_OUTPUT_ACTIVE_LEVEL SN32_PWM_OUTPUT_ACTIVE_LOW | ||
#endif | ||
|
||
#if !defined(SN32_RGB_OUTPUT_ACTIVE_LEVEL) | ||
# define SN32_RGB_OUTPUT_ACTIVE_LEVEL SN32_RGB_OUTPUT_ACTIVE_HIGH | ||
#endif | ||
|
||
#if !defined(SN32_PWM_CONTROL) | ||
# define SN32_PWM_CONTROL HARDWARE_PWM | ||
#endif | ||
|
||
#if !defined(SN32_PWM_DIRECTION) | ||
# define SN32_PWM_DIRECTION DIODE_DIRECTION | ||
#endif | ||
|
||
#if !defined(SN32_RGB_MATRIX_ROW_CHANNELS) | ||
# define SN32_RGB_MATRIX_ROW_CHANNELS 3 | ||
#endif | ||
|
||
#if !defined(SN32_RGB_MATRIX_ROWS) | ||
# define SN32_RGB_MATRIX_ROWS MATRIX_ROWS | ||
#endif | ||
|
||
#if !defined(SN32_RGB_MATRIX_COLS) | ||
# define SN32_RGB_MATRIX_COLS MATRIX_COLS | ||
#endif | ||
|
||
#if !defined(SN32_RGB_MATRIX_ROW_PINS) | ||
# error Missing definition for SN32_RGB_MATRIX_ROW_PINS | ||
#endif | ||
|
||
#if !defined(SN32_RGB_MATRIX_COL_PINS) | ||
# define SHARED_MATRIX | ||
# define SN32_RGB_MATRIX_COL_PINS MATRIX_COL_PINS | ||
#endif | ||
|
||
#if !defined(SN32_RGB_MATRIX_ROWS_HW) | ||
# define SN32_RGB_MATRIX_ROWS_HW (SN32_RGB_MATRIX_ROWS * SN32_RGB_MATRIX_ROW_CHANNELS) | ||
#endif | ||
|
||
void sn32f2xx_init(void); | ||
void sn32f2xx_flush(void); | ||
void sn32f2xx_set_color(int index, uint8_t r, uint8_t g, uint8_t b); | ||
void sn32f2xx_set_color_all(uint8_t r, uint8_t g, uint8_t b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.