I have a list of structs:
typedef struct {
uint8_t mac_addr[6];
uint32_t signal;
uint32_t freq;
...
}pseudo_entry;
I'm sorting this entrys when inserting something in the list.
Pseudo:
while(next)
if(curr.mac_addr < next.mac_addr)
if(curr.signal < next.signal)
...
That's very inflexible and I want an ordering I can give as startup parameter. Any good ideas?
I don't need whole code. Just ideas or maybe libs.
Thanks. :)