diff --git a/ex00/src/main.c b/ex00/src/main.c index 5c0a2bd..43c86bf 100644 --- a/ex00/src/main.c +++ b/ex00/src/main.c @@ -1,15 +1,3 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* main.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: mguillot +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2026/04/18 18:50:52 by mguillot #+# #+# */ -/* Updated: 2026/04/19 16:57:19 by mguillot ### ########.fr */ -/* */ -/* ************************************************************************** */ - #include #include diff --git a/ex01/src/main.c b/ex01/src/main.c index 66dc6a0..f4726fc 100644 --- a/ex01/src/main.c +++ b/ex01/src/main.c @@ -1,15 +1,3 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* main.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: mguillot +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2026/04/18 18:50:52 by mguillot #+# #+# */ -/* Updated: 2026/04/19 16:57:19 by mguillot ### ########.fr */ -/* */ -/* ************************************************************************** */ - #include #include diff --git a/ex02/src/main.c b/ex02/src/main.c index 7ba40f1..cfe5679 100644 --- a/ex02/src/main.c +++ b/ex02/src/main.c @@ -1,15 +1,3 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* main.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: mguillot +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2026/04/18 18:50:52 by mguillot #+# #+# */ -/* Updated: 2026/04/19 16:57:19 by mguillot ### ########.fr */ -/* */ -/* ************************************************************************** */ - #include #include diff --git a/ex03/src/main.c b/ex03/src/main.c index 0d1c071..36a232b 100644 --- a/ex03/src/main.c +++ b/ex03/src/main.c @@ -1,15 +1,3 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* main.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: mguillot +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2026/04/18 18:50:52 by mguillot #+# #+# */ -/* Updated: 2026/04/19 16:57:19 by mguillot ### ########.fr */ -/* */ -/* ************************************************************************** */ - #include #include @@ -19,12 +7,12 @@ int main(void) { uart_init(); - adc_init(ADC_INT, ADC_PRESCALER_64); + adc_init(ADC_INT, ADC_PRESCALER_128); _delay_ms(20); while (true) { uint16_t raw = adc_read_pin_10bit(ADC_TEMP); - uint16_t temp = (raw - 324) * 100 / 122; + uint16_t temp = (int16_t)((int32_t)raw - 324) / 1.22; uart_send_u16(temp); uart_sendstring("C\r\n"); diff --git a/ex04/src/main.c b/ex04/src/main.c index 5aa81e4..d30d9a2 100644 --- a/ex04/src/main.c +++ b/ex04/src/main.c @@ -1,15 +1,3 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* main.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: mguillot +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2026/04/18 18:50:52 by mguillot #+# #+# */ -/* Updated: 2026/04/19 16:57:19 by mguillot ### ########.fr */ -/* */ -/* ************************************************************************** */ - #include #include