Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Первый проект с stm8 и sdcc!
- //
- #include <stm8s.h>
- static void delay(uint32_t t)
- {
- while(t--) {}
- }
- int main(void)
- {
- // led
- GPIOD->DDR |= (1 << 0);
- GPIOD->ODR |= (1 << 0);
- while(1)
- {
- GPIOD->ODR |= (1 << 0);
- delay(100000UL);
- GPIOD->ODR &= ~(1 << 0);
- delay(100000UL);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement