Remove useless include/hexagram/table.h
This commit is contained in:
		
							parent
							
								
									eeeb5659a9
								
							
						
					
					
						commit
						e7f2de41ca
					
				
					 4 changed files with 9 additions and 22 deletions
				
			
		| 
						 | 
					@ -6,11 +6,12 @@
 | 
				
			||||||
#include <sys/time.h>
 | 
					#include <sys/time.h>
 | 
				
			||||||
#include <signal.h>
 | 
					#include <signal.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <hexagram/table.h>
 | 
					#include <hexagram/can.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _hexagram_schedule_slot {
 | 
					typedef struct _hexagram_schedule_slot {
 | 
				
			||||||
    time_t interval_us;
 | 
					    time_t interval_us;
 | 
				
			||||||
    hexagram_table_entry *entry;
 | 
					    hexagram_can_if *iface;
 | 
				
			||||||
 | 
					    struct can_frame frame;
 | 
				
			||||||
} hexagram_schedule_slot;
 | 
					} hexagram_schedule_slot;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct _hexagram_schedule {
 | 
					typedef struct _hexagram_schedule {
 | 
				
			||||||
| 
						 | 
					@ -24,7 +25,7 @@ typedef struct _hexagram_schedule {
 | 
				
			||||||
    int error;
 | 
					    int error;
 | 
				
			||||||
} hexagram_schedule;
 | 
					} hexagram_schedule;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
hexagram_schedule *hexagram_schedule_create(hexagram_table_entry *table,
 | 
					hexagram_schedule *hexagram_schedule_create(hexagram_schedule_slot *table,
 | 
				
			||||||
                                            size_t count);
 | 
					                                            size_t count);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void hexagram_schedule_destroy(hexagram_schedule *schedule);
 | 
					void hexagram_schedule_destroy(hexagram_schedule *schedule);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +0,0 @@
 | 
				
			||||||
#ifndef _HEXAGRAM_TABLE_H
 | 
					 | 
				
			||||||
#define _HEXAGRAM_TABLE_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <sys/time.h>
 | 
					 | 
				
			||||||
#include <hexagram/can.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
typedef struct _hexagram_table_entry {
 | 
					 | 
				
			||||||
    time_t freq_us;
 | 
					 | 
				
			||||||
    hexagram_can_if *iface;
 | 
					 | 
				
			||||||
    struct can_frame frame;
 | 
					 | 
				
			||||||
} hexagram_table_entry;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* _HEXAGRAM_TABLE_H */
 | 
					 | 
				
			||||||
| 
						 | 
					@ -9,7 +9,7 @@ LDFLAGS		= $(shell pkg-config --libs cairo x11) -lXext
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEADERS		= dict.h hash.h can.h capture.h pcapng.h module.h window.h \
 | 
					HEADERS		= dict.h hash.h can.h capture.h pcapng.h module.h window.h \
 | 
				
			||||||
		  gauge.h tacho.h speedo.h thermo.h fuel.h mfd.h cluster.h \
 | 
							  gauge.h tacho.h speedo.h thermo.h fuel.h mfd.h cluster.h \
 | 
				
			||||||
		  sim.h schedule.h table.h
 | 
							  sim.h schedule.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEADERS_LOCAL	= util.h
 | 
					HEADERS_LOCAL	= util.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,7 +42,7 @@ static void _ev_notify(hexagram_schedule *schedule) {
 | 
				
			||||||
        hexagram_schedule_slot *slot = _slot(schedule, schedule->current);
 | 
					        hexagram_schedule_slot *slot = _slot(schedule, schedule->current);
 | 
				
			||||||
        time_t delay = slot->interval_us;
 | 
					        time_t delay = slot->interval_us;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (hexagram_can_if_write(slot->entry->iface, &slot->entry->frame) < 0) {
 | 
					        if (hexagram_can_if_write(slot->iface, &slot->frame) < 0) {
 | 
				
			||||||
            schedule->error = errno;
 | 
					            schedule->error = errno;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
| 
						 | 
					@ -65,7 +65,7 @@ static void _ev_notify(hexagram_schedule *schedule) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int _schedule_init(hexagram_schedule *schedule,
 | 
					static int _schedule_init(hexagram_schedule *schedule,
 | 
				
			||||||
                          hexagram_table_entry *table,
 | 
					                          hexagram_schedule_slot *table,
 | 
				
			||||||
                          size_t count) {
 | 
					                          size_t count) {
 | 
				
			||||||
    size_t i;
 | 
					    size_t i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,8 +87,7 @@ static int _schedule_init(hexagram_schedule *schedule,
 | 
				
			||||||
    for (i=0; i<count; i++) {
 | 
					    for (i=0; i<count; i++) {
 | 
				
			||||||
        hexagram_schedule_slot *slot = &((hexagram_schedule_slot *)(schedule + 1))[i];
 | 
					        hexagram_schedule_slot *slot = &((hexagram_schedule_slot *)(schedule + 1))[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        slot->interval_us = table[i].freq_us;
 | 
					        memcpy(slot, &table[i], sizeof(hexagram_schedule_slot));
 | 
				
			||||||
        slot->entry       = &table[i];
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    qsort(schedule + 1, count, sizeof(hexagram_schedule_slot), _slot_cmp);
 | 
					    qsort(schedule + 1, count, sizeof(hexagram_schedule_slot), _slot_cmp);
 | 
				
			||||||
| 
						 | 
					@ -99,7 +98,7 @@ error_timer_create:
 | 
				
			||||||
    return -1;
 | 
					    return -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
hexagram_schedule *hexagram_schedule_create(hexagram_table_entry *table,
 | 
					hexagram_schedule *hexagram_schedule_create(hexagram_schedule_slot *table,
 | 
				
			||||||
                                            size_t count) {
 | 
					                                            size_t count) {
 | 
				
			||||||
    hexagram_schedule *schedule;
 | 
					    hexagram_schedule *schedule;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue