main
MMS 2 years ago
parent 971feed94a
commit 887b9a214d

@ -8,7 +8,7 @@
// D12 (longer leg) on the CN9 connector // D12 (longer leg) on the CN9 connector
#define LD5_PIN 6U #define LD5_PIN 6U
typedef struct { typedef struct /* __attribute__((packed)) */ {
uint8_t y; uint8_t y;
uint16_t x; uint16_t x;
} Point; } Point;

@ -1,13 +1,13 @@
#include <stdint.h> // C99 standard integers #include "tm4c_cmsis.h" // CMSIS-compatible interface
#include "tm4c_cmsis.h"
#include "delay.h" #include "delay.h"
#include <stdint.h> // C99 standard integers
#define LED_RED (1U << 1) #define LED_RED (1U << 1)
#define LED_BLUE (1U << 2) #define LED_BLUE (1U << 2)
#define LED_GREEN (1U << 3) #define LED_GREEN (1U << 3)
typedef struct { typedef struct /* _packed */ {
uint8_t y; uint8_t y;
uint16_t x; uint16_t x;
} Point; } Point;
@ -68,7 +68,7 @@ int main(void) {
GPIOF_AHB->DATA_Bits[LED_RED] = 0; GPIOF_AHB->DATA_Bits[LED_RED] = 0;
delay(500000); delay(250000);
} }
//return 0; // unreachable code //return 0; // unreachable code
} }

@ -1,13 +1,13 @@
#include <stdint.h> // C99 standard integers #include "tm4c_cmsis.h" // CMSIS-compatible interface
#include "tm4c_cmsis.h"
#include "delay.h" #include "delay.h"
#include <stdint.h> // C99 standard integers
#define LED_RED (1U << 1) #define LED_RED (1U << 1)
#define LED_BLUE (1U << 2) #define LED_BLUE (1U << 2)
#define LED_GREEN (1U << 3) #define LED_GREEN (1U << 3)
typedef struct { typedef struct /* __attribute__((packed)) */ {
uint8_t y; uint8_t y;
uint16_t x; uint16_t x;
} Point; } Point;
@ -68,7 +68,7 @@ int main(void) {
GPIOF_AHB->DATA_Bits[LED_RED] = 0; GPIOF_AHB->DATA_Bits[LED_RED] = 0;
delay(500000); delay(250000);
} }
//return 0; // unreachable code //return 0; // unreachable code
} }

Loading…
Cancel
Save