Keyboard: Add new keyboard "Sol" from RGBKB (#4497)
* Add final RGBKB Sol firmware * Apply suggestions from code review Apply most of the changes noroadsleft has suggested Co-Authored-By: Legonut <legonut3@gmail.com> * Cleanup readme * Cleanup keymaps per @noroadslefts suggestions * Remove eeproms, use set_single_persistent_default_layer * Suggestions from @noroadsleft and @drashna some small cleanup * Change RGB_SMOD to RGB_RMOD * fix RGB_SMOD * Apply suggestions from code review Remove redundant lines Co-Authored-By: Legonut <legonut3@gmail.com>
This commit is contained in:
		
							parent
							
								
									6d0dc910d9
								
							
						
					
					
						commit
						8a330b33ff
					
				
					 35 changed files with 3838 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								keyboards/sol/common/knob_v2.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								keyboards/sol/common/knob_v2.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
// Rotary knob implementation - Version 2.
 | 
			
		||||
// Uses 2 digital pins - D2 (via interrupt) & D6.
 | 
			
		||||
// #include "rev1.h"
 | 
			
		||||
#include <avr/io.h>
 | 
			
		||||
#include <avr/interrupt.h>
 | 
			
		||||
#include <stdbool.h>
 | 
			
		||||
 | 
			
		||||
#ifndef ENCODER_PIN_1
 | 
			
		||||
  #define ENCODER_PIN_1 PD2
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef ENCODER_PIN_2
 | 
			
		||||
  #define ENCODER_PIN_2 PD6
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef ENCODER_INT
 | 
			
		||||
  #define ENCODER_INT   INT2_vect
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct knob_report_t {
 | 
			
		||||
    int8_t dir;  // Contains number of rotations that happened
 | 
			
		||||
    int8_t phase;  // Contains 0 if last rotation happened on 90 degrees, 1 if on 270
 | 
			
		||||
}  knob_report_t;
 | 
			
		||||
 | 
			
		||||
void knob_init(void);
 | 
			
		||||
knob_report_t knob_report_read(void);
 | 
			
		||||
void knob_report_reset(void);
 | 
			
		||||
 | 
			
		||||
bool knob_prev_a;
 | 
			
		||||
int8_t knob_dir;
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue