add: gpio drivers
This commit is contained in:
		
							parent
							
								
									ba70677393
								
							
						
					
					
						commit
						3cd6668f9c
					
				
					 8 changed files with 131 additions and 76 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,5 @@
 | 
			
		|||
#define SECONDS_PER_DAY 86400 // 60 * 60 * 24
 | 
			
		||||
 | 
			
		||||
#define SECONDS_PER_MINUTE 60
 | 
			
		||||
 | 
			
		||||
#define POLL_FDS_COUNT 2
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,8 +3,8 @@
 | 
			
		|||
 | 
			
		||||
enum poll_fgs
 | 
			
		||||
{
 | 
			
		||||
    POLL_FGS_DISCOVERY,
 | 
			
		||||
    POLL_FGS_COMMAND
 | 
			
		||||
    POLL_FDS_DISCOVERY,
 | 
			
		||||
    POLL_FDS_COMMAND
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum discovery_mapping
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,8 @@
 | 
			
		|||
#ifndef CONTROLLER_HANDLERS_H
 | 
			
		||||
#define CONTROLLER_HANDLERS_H
 | 
			
		||||
 | 
			
		||||
#include <poll.h>
 | 
			
		||||
 | 
			
		||||
#include <models/controller.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -21,4 +23,10 @@ handler_command(int fd, controller_t *controller);
 | 
			
		|||
void
 | 
			
		||||
handler_discovery(int fd, controller_t *controller);
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
handler_loop(controller_t *this_controller);
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
handler_poll(struct pollfd *fds, controller_t *controller, MDB_env *mdb_env);
 | 
			
		||||
 | 
			
		||||
#endif /* CONTROLLER_HANDLERS_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue