Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Myfun.h"
- extern volatile uint32_t tick2,lcdvalue;
- extern volatile uint8_t stan;
- int main(void)
- {
- SysTick_Config(4000000 / 1000);
- Led_Conf();
- Joy_Conf();
- LCD7seg_conf();
- while(1)
- {
- if(stan == 0){
- if(Joy_Read() == Center) stan = 1;
- }
- if(stan == 1){
- if(Joy_Read() == Center) stan = 0;
- }
- }
- }
- /////////////////// Myfun.c
- void SysTick_Handler(void) //przrwanie od systick
- {
- tick++;
- lcdvalue = tick2;
- if(stan == 1){
- tick2++;
- }
- Lcd7seg_WriteNumber();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement