forked from len0rd/rockbox
		
	adjustments for Neo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4130 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
		
							parent
							
								
									503ce1bc04
								
							
						
					
					
						commit
						006b2c1c25
					
				
					 4 changed files with 89 additions and 4 deletions
				
			
		|  | @ -328,4 +328,38 @@ static int button_read(void) | |||
|     return btn; | ||||
| } | ||||
| 
 | ||||
| #elif HAVE_NEO_KEYPAD | ||||
| static bool mStation = false; | ||||
| void button_init(void) | ||||
| { | ||||
|     /* set port pins as input */ | ||||
|     PAIOR &= ~0x4000;  //PA14 for stop button
 | ||||
| 
 | ||||
|     queue_init(&button_queue); | ||||
|     tick_add_task(button_tick); | ||||
| 
 | ||||
|     last_keypress = current_tick; | ||||
| } | ||||
| int button_read(void) | ||||
| { | ||||
|     int btn=BUTTON_NONE; | ||||
|      | ||||
|     btn|=((~PCDR)&0xFF); | ||||
| 
 | ||||
|     /* mStation does not have a stop button and this floods the button queue
 | ||||
|        with stops if used on a mStation */ | ||||
|     if (!mStation) | ||||
|         btn|=((~(PADR>>6))&0x100); | ||||
| 
 | ||||
|     return btn; | ||||
| } | ||||
| 
 | ||||
| /* This function adds a button press event to the button queue, and this
 | ||||
|    really isn't anything Neo-specific but might be subject for adding to | ||||
|    the generic button driver */ | ||||
| int button_add(unsigned int button) | ||||
| { | ||||
|     queue_post(&button_queue,button,NULL); | ||||
|     return 1; | ||||
| } | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue