Skip to content

Commit

Permalink
Updated Header files.
Browse files Browse the repository at this point in the history
  • Loading branch information
CECS-Jesus authored May 9, 2024
1 parent 8c88c8a commit b2a2582
Show file tree
Hide file tree
Showing 8 changed files with 12,991 additions and 12,951 deletions.
40 changes: 20 additions & 20 deletions inc/LED.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#ifndef LED_H
#define LED_H

#define LED (*((volatile unsigned long *)0x40025038)) // use onboard three LEDs: PF321

#define RGB 0x0E // PF3, PF2, PF1
#define Dark 0x00 // ---
#define Red 0x02 // R--
#define Blue 0x04 // --B
#define Green 0x08 // -G-
#define Yellow 0x0A // RG-
#define Cran 0x0C // -GB
#define White 0x0E // RGB
#define Purple 0x06 // R-B

#include "tm4c123gh6pm.h"

void led_init(void);

#endif
#ifndef LED_H
#define LED_H

#define LED (*((volatile unsigned long *)0x40025038)) // use onboard three LEDs: PF321

#define RGB 0x0E // PF3, PF2, PF1
#define Dark 0x00 // ---
#define Red 0x02 // R--
#define Blue 0x04 // --B
#define Green 0x08 // -G-
#define Yellow 0x0A // RG-
#define Cran 0x0C // -GB
#define White 0x0E // RGB
#define Purple 0x06 // R-B

#include "tm4c123gh6pm.h"

void led_init(void);

#endif
30 changes: 15 additions & 15 deletions inc/MotorControl.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#ifndef MOTORCONTROL_H
#define MOTORCONTROL_H

#include "LED.h"
#include "tm4c123gh6pm.h"

void move_forward(void);
void move_backward(void);
void pivot_left(void);
void pivot_right(void);
void turn_left(void);
void turn_right(void);
void stop_motors(void);

#endif
#ifndef MOTORCONTROL_H
#define MOTORCONTROL_H

#include "LED.h"
#include "tm4c123gh6pm.h"

void move_forward(void);
void move_backward(void);
void pivot_left(void);
void pivot_right(void);
void turn_left(void);
void turn_right(void);
void stop_motors(void);

#endif
32 changes: 16 additions & 16 deletions inc/MotorSetup.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#ifndef MOTORSETUP_H
#define MOTORSETUP_H

#define STOP 1
#define MAX_SPEED PERIOD - 1
#define HALF_SPEED PERIOD * 0.5

#include <stdint.h>
#include "tm4c123gh6pm.h"
#include "PLL.h"

void motors_init(void);
void pwm_duty(unsigned long dutyL, unsigned long dutyR);
unsigned long get_current_duty(void);

#endif
#ifndef MOTORSETUP_H
#define MOTORSETUP_H

#define STOP 1
#define MAX_SPEED PERIOD - 1
#define HALF_SPEED PERIOD * 0.5

#include <stdint.h>
#include "tm4c123gh6pm.h"
#include "PLL.h"

void motors_init(void);
void pwm_duty(unsigned long dutyL, unsigned long dutyR);
unsigned long get_current_duty(void);

#endif
Loading

0 comments on commit b2a2582

Please sign in to comment.