Go to the source code of this file.
Functions | |
int | str2ffmt (char *str) |
uint8_t | set_bit_in_byte (uint8_t src, int bit, int val) |
uint16_t | set_bit_in_word (uint16_t src, int bit, int val) |
uint64_t | get_program_time (void) |
DList * | dlist_add (DList *head, AvrClass *data, DListFP_Cmp cmp) |
DList * | dlist_add_head (DList *head, AvrClass *data) |
DList * | dlist_delete (DList *head, AvrClass *data, DListFP_Cmp cmp) |
void | dlist_delete_all (DList *head) |
AvrClass * | dlist_lookup (DList *head, AvrClass *data, DListFP_Cmp cmp) |
AvrClass * | dlist_get_head_data (DList *head) |
DList * | dlist_iterator (DList *head, DListFP_Iter func, void *user_data) |
This module provides general purpose utilities.
Definition in file utils.c.
|
Utility function to convert a string to a FileFormatType code.
|
|
Set a bit in src to 1 if val != 0, clears bit if val == 0.
|
|
Set a bit in src to 1 if val != 0, clears bit if val == 0.
|
|
Return the number of milliseconds of elapsed program time.
Definition at line 76 of file utils.c. References avr_error. Referenced by avr_core_run(). |
|
Add a new node to the end of the list. If cmp argument is not NULL, use cmp() to see if node already exists and don't add node if it exists. It is the responsibility of this function to unref data if not added. Definition at line 159 of file utils.c. References class_unref(). |
|
Add a new node at the head of the list.
|
|
Conditionally delete a node from the list. Delete a node from the list if the node's data matches the specified data. Returns the head of the modified list. Definition at line 215 of file utils.c. References avr_error, and class_unref(). Referenced by dlist_iterator(). |
|
Blow away the entire list.
Definition at line 266 of file utils.c. References class_unref(). Referenced by avr_core_destroy(). |
|
Lookup an item in the list. Walk the list pointed to by head and return a pointer to the data if found. If not found, return NULL.
Definition at line 291 of file utils.c. References avr_error. Referenced by mem_get_vdevice_by_name(). |
|
Extract the data from the head of the list. Returns the data element for the head of the list. If the list is empty, return a NULL pointer.
|
|
Iterate over all elements of the list. For each element, call the user supplied iterator function and pass it the node data and the user_data. If the iterator function return non-zero, remove the node from the list.
Definition at line 357 of file utils.c. References avr_error, and dlist_delete(). |