Revision 1496
Reverted "libdragonfly" folder back to version before Init Checking was implemented and did "make dist" to recompile the library. BOM LEDs now shine
correctly.
dragonfly_lib.h | ||
---|---|---|
41 | 41 |
* @{ |
42 | 42 |
**/ |
43 | 43 |
|
44 |
// Configuration definitions |
|
45 |
/** @brief Initialize analog **/ |
|
46 |
#define ANALOG 0x01 |
|
47 |
/** @brief Initialize serial communications **/ |
|
48 |
#define SERIAL 0x02 |
|
49 |
/** @brief Initialize USB communications **/ |
|
50 |
#define USB 0x02 |
|
51 |
/** @brief Initialize communications **/ |
|
52 |
#define COMM 0x02 |
|
53 |
/** @brief Initialize the orb **/ |
|
54 |
#define ORB 0x04 |
|
55 |
/** @brief Initialize the motors **/ |
|
56 |
#define MOTORS 0x08 |
|
57 |
/** @brief Initialize I2C **/ |
|
58 |
#define I2C 0x20 |
|
59 |
/** @brief Initialize the buzzer **/ |
|
60 |
#define BUZZER 0x40 |
|
61 |
/** @brief Initialize the LCD screen **/ |
|
62 |
#define LCD 0x80 |
|
63 |
/** @brief Initialize the rangefinders **/ |
|
64 |
#define RANGE 0x0100 |
|
65 |
/** @brief Initialize the BOM **/ |
|
66 |
#define BOM 0x0200 |
|
67 |
/** @brief Initilize encoders **/ |
|
68 |
#define ENCODERS 0x400 |
|
69 |
/** @brief Initialize everything **/ |
|
70 |
#define ALL_ON 0x07FF |
|
71 |
|
|
44 | 72 |
/** @brief Initialize the board **/ |
45 | 73 |
void dragonfly_init(int config); |
46 | 74 |
|
... | ... | |
56 | 84 |
// missing from the AVR libc distribution. |
57 | 85 |
#include "atomic.h" |
58 | 86 |
|
59 |
#include "dragonfly_defs.h" |
|
60 | 87 |
#include "analog.h" |
61 | 88 |
#include "dio.h" |
62 | 89 |
#include "time.h" |
... | ... | |
76 | 103 |
#include <stddef.h> |
77 | 104 |
#include <stdbool.h> |
78 | 105 |
|
106 |
/** @brief shortcut for ATOMIC_BLOCK(ATOMIC_RESTORESTATE) **/ |
|
107 |
#define SYNC ATOMIC_BLOCK(ATOMIC_RESTORESTATE) |
|
108 |
|
|
109 |
/** @brief atomically grab a lock if it is free, return otherwise **/ |
|
110 |
#define REQUIRE_LOCK_OR_RETURN(LOCK) do { SYNC { if (LOCK) return; LOCK=1; } } while (0) |
|
111 |
|
|
112 |
/** @brief atomically release a lock **/ |
|
113 |
#define RELEASE_LOCK(LOCK) do { LOCK=0; } while (0) |
|
114 |
|
|
115 |
|
|
116 |
|
|
79 | 117 |
#endif |
80 | 118 |
|
Also available in: Unified diff