ATY_LIB V2_102_230218
ATY_LIB for general devices or ALGO
 
Loading...
Searching...
No Matches
main.c File Reference
#include "fw_hal.h"

Go to the source code of this file.

Functions

void GPIO_Init (void)
 
int main (void)
 

Variables

uint8_t cw [8]
 

Function Documentation

◆ GPIO_Init()

void GPIO_Init ( void  )

Definition at line 44 of file main.c.

45{
46 // P10, P11, P12, P13
48}
@ GPIO_Pin_2
Definition: fw_gpio.h:47
@ GPIO_Pin_0
Definition: fw_gpio.h:45
@ GPIO_Pin_3
Definition: fw_gpio.h:48
@ GPIO_Pin_1
Definition: fw_gpio.h:46
#define GPIO_P1_SetMode(__PINS__, __MODE__)
Definition: fw_gpio.h:79
@ GPIO_Mode_Output_PP
Definition: fw_gpio.h:24

◆ main()

int main ( void  )

Definition at line 50 of file main.c.

51{
52 uint8_t step;
55 GPIO_Init();
56
57 while(1)
58 {
59 for (pos = 0; pos < 640; pos++)
60 {
61 step = 8;
62 while (step--)
63 {
64 P1 = P1 & 0xF0 | cw[7 - step];
65 SYS_Delay(5);
66 }
67 }
68 SYS_Delay(500);
69 for (pos = 0; pos < 640; pos++)
70 {
71 step = 8;
72 while (step--)
73 {
74 P1 = P1 & 0xF0 | cw[step];
75 SYS_Delay(5);
76 }
77 }
78 SYS_Delay(500);
79 }
80}
uint8_t pos
void SYS_SetClock(void)
Definition: fw_sys.c:40
void SYS_Delay(uint16_t t)
Definition: fw_sys.c:65
unsigned short uint16_t
Definition: fw_types.h:19
unsigned char uint8_t
Definition: fw_types.h:18
void GPIO_Init(void)
Definition: main.c:39
uint8_t cw[8]
Definition: main.c:33

Variable Documentation

◆ cw

uint8_t cw[8]
Initial value:
={
0B00001001,
0B00000001,
0B00000011,
0B00000010,
0B00000110,
0B00000100,
0B00001100,
0B00001000
}

Definition at line 33 of file main.c.