Branch clean-up

This commit is contained in:
giezz 2023-04-24 22:25:45 +03:00
parent 1c91ad6e9e
commit acd7c3eae7
2 changed files with 1 additions and 45 deletions

3
main.c
View File

@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
double calculate(char op, double num1, double num2) {
double result = 0;
switch (op) {
@ -19,13 +18,11 @@ double calculate(char op, double num1, double num2) {
}
return result;
}
int main() {
double number = 0;
double tmpNumber = 0;
char input;
char operator;
while (1) {
scanf(" %c", &input);
switch (input) {

View File

@ -1,41 +0,0 @@
#include <avr/io.h>
#include <avr/interrupt.h>
//#define F_CPU 16000000
unsigned char i = 0;
void port_set () // Функция установки портов.
{
DDRD = 255; // Весь порт на вход (на всякий случай).
PORTD = 255; // Для проверки схемы зажжём весь порт.
}
int main(void)
{
setup();
while(1)
{
//TODO:: Please write your application code
Serial.println(PIND);
//Serial.println(DDRD);
//Serial.println("1");
//Serial.println(i);
}
}
void setup() {
Serial.begin(9600);
// put your setup code here, to run once:
/* Настройка резисторов pull-up и установка выходов в лог. 1.
Задается направление работы для выводов порта. */
DDRD &= ~(1 << 0);
PORTD |= (1 << 0);
//DDRD = B11110000;
//PORTD = (1 << PD7)|(1 << PD6)|(1 << PD5)|(1 << PD4);
//DDRD = (1 << DDD3)|(1 << DDD2)|(1 << DDD1)|(1 << DDD0);
/* Добавление инструкции nop для синхронизации. */
/* Чтение выводов порта. */
i = PIND;
}