File tree 3 files changed +11
-11
lines changed
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 8
8
// D12 (longer leg) on the CN9 connector
9
9
#define LD5_PIN 6U
10
10
11
- typedef struct {
11
+ typedef struct /* __attribute__((packed)) */ {
12
12
uint8_t y ;
13
13
uint16_t x ;
14
14
} Point ;
Original file line number Diff line number Diff line change 1
- #include <stdint.h> // C99 standard integers
2
-
3
- #include "tm4c_cmsis.h"
1
+ #include "tm4c_cmsis.h" // CMSIS-compatible interface
4
2
#include "delay.h"
5
3
4
+ #include <stdint.h> // C99 standard integers
5
+
6
6
#define LED_RED (1U << 1)
7
7
#define LED_BLUE (1U << 2)
8
8
#define LED_GREEN (1U << 3)
9
9
10
- typedef struct {
10
+ typedef struct /* _packed */ {
11
11
uint8_t y ;
12
12
uint16_t x ;
13
13
} Point ;
@@ -68,7 +68,7 @@ int main(void) {
68
68
69
69
GPIOF_AHB -> DATA_Bits [LED_RED ] = 0 ;
70
70
71
- delay (500000 );
71
+ delay (250000 );
72
72
}
73
73
//return 0; // unreachable code
74
74
}
Original file line number Diff line number Diff line change 1
- #include <stdint.h> // C99 standard integers
2
-
3
- #include "tm4c_cmsis.h"
1
+ #include "tm4c_cmsis.h" // CMSIS-compatible interface
4
2
#include "delay.h"
5
3
4
+ #include <stdint.h> // C99 standard integers
5
+
6
6
#define LED_RED (1U << 1)
7
7
#define LED_BLUE (1U << 2)
8
8
#define LED_GREEN (1U << 3)
9
9
10
- typedef struct {
10
+ typedef struct /* __attribute__((packed)) */ {
11
11
uint8_t y ;
12
12
uint16_t x ;
13
13
} Point ;
@@ -68,7 +68,7 @@ int main(void) {
68
68
69
69
GPIOF_AHB -> DATA_Bits [LED_RED ] = 0 ;
70
70
71
- delay (500000 );
71
+ delay (250000 );
72
72
}
73
73
//return 0; // unreachable code
74
74
}
You can’t perform that action at this time.
0 commit comments