In STM32F446RE this is the activation code for analog inputs.
My questions are:
Why &hadc1 instead of just hadc1? Isnt & a logical operation done over two binary numbers?
What does the Pollforconversion do and what is HAL_MAX_DELAY?
I sent my teacher this email on tuesday for a test on monday amd he hasnt replied so here i am again
> Isnt & a logical operation done over two binary numbers?
Source? In order for you to believe this you must have read it somewhere right? You wouldn’t pull this out of your ass like a fucking retard right?
it's the AND operator, dunning kruger
> it's the AND operator
Source?
you're mom
>no help, just name calling to cover up for the fact that he's a dumb fucking nagger and a massive homosexual
shut the fuck up, nagger RETARD.
>Why &hadc1 instead of just hadc1? Isnt & a logical operation done over two binary numbers?
have you covered "pointers" in your programming classes? &hadc1 resolves to the memory address of hadc1. HAL_ADC_Start() function is required to point toward an address.
>What does the Pollforconversion do and what is HAL_MAX_DELAY?
see below
>This function allows waiting for the end of conversions when the polling method is used. In this case, a timout value is specified by the user according to the application.
HAL_MAX_DELAY is the maximum amount of time it will wait before cancelling the polling operation (to prevent it for waiting for an infinitely period of time.)
in general you can find answers here https://www.st.com/resource/en/user_manual/um1850-description-of-stm32f1-hal-and-lowlayer-drivers-stmicroelectronics.pdf
>>no help, just name calling to cover up for the fact that he's a dumb fucking nagger and a massive homosexual
Here comes the spoonfeeding nagger LOL you are the reason the world is filled with retards incapable of self reflection
no one cares troon homosexual
Spoonfeeding is troon behavior
>here’s how to change your sex my little princess
>how it works? Why it works? Don’t worry just do it and come to my discord :333
Useless
Arent pointers marked with *?
Basically it points to where its all setup and where its supposed to pull values from?
Why would it cancel a polling operation? Can you tell me what is it polling exactly?
Okay i googled it. Polling AKA constantly checking for a change of value on the input, now HAL delay would be the delay between checks no?
> Arent pointers marked with *?
AHAHAHAHAH EVEN WHEN THOROUGHLY SPOONFED HE STILL KEEPS BELIEVING HIS OWN MISCONCEPTIONS AAHAHAHAH
>useless
Exactly, you are incapable of putting two thoughts together. You will never be capable of analyzing your own errors and backtracking your own beliefs
>Arent pointers marked with *?
that's how you declare/define a pointer. a pointer is just a memory address. you reference a pointer's memory address with &. the function in your OP requires a pointer address, which is why it's being fed "&hadc1". study pointers again. they're confusing at first but once you get more practice it will click.
>Why would it cancel a polling operation? Can you tell me what is it polling exactly?
polling in this context is basically a function that says "hey can you give me the ADC value?" until it receives one from the ADC. so imagine you set HAL_MAX_DELAY to something ridiculous like an hour and imagine the ADC never responds for one reason or another. the function is blocking, so you're going to be locking up your entire program for an hour while the function polls the ADC for a value.
the alternative is to do this with interrupts. the ADC conversion is done and an interrupt is fired off that allows the MCU to read the ADC value.
Yeah but hadc1 hadnt been declared a pointer anywhere in the code before being referenced and it still worked
Youre being very helpful
>Yeah but hadc1 hadnt been declared a pointer anywhere in the code before being referenced and it still worked
look in the HAL source code, stm32f4xx_hal_adc.h
>HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc);
>HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout);
If you find pointers confusing you're a brainlet
Go read about pointers in C and never come back, underage nagger.
use python like everyone else, C isn't for you.
you know absolutely nothing about C.
>teacher
oh, sorry, I forgot this is a homework website.
school will never teach you programming, it's a skill you learn yourself. also you're better off asking chatGPT or just googling instead of asking those larping retards here
he doesn't even know about the AND operator, he is sperging out because i revealed his shortcomings
> he doesn't even know about the AND operator
So, which other number is &hadc1 operating on?
This thread hurts to read. I used to feel bad about teaching myself like I'd never be as good as a CS student but this thread gives me hope.
Im a mechatronics student and this is my first time doing c.. you can go back to feeling bad.
THANK YOI
>Im a mechatronics student and this is my first time doing c.. you can go back to feeling bad
Nope, I feel great.
Kill yourself.
everyone starts somewhere and the overwhelming majority of CS or "coding" teachers are absolute shit at teaching.
I can't believe someone gave him all the solutions instead of telling him to go read a fucking C book, kill yourself you worthless spoonfeeder.
go seethe about it and groom some more underage boys on discord, troony toon.
I've never used Discord you fucking cocksucker.
Next time tell the fucker to read a book.
You don't belong here, btw.
how do I know you are a newfag troon? because you hate programming newbies. LULZ always loved, helped and spoonfeed the programming newbies, while reddit was always telling them to RTFM. Source: Me.
>Source: Me.
A dumbass reddittor is all you are.
I've definitely been here longer than you.
not your secret club. go seethe about it while you fist fuck your festering facsimile of a vagina, troon.
>troon troon troon
Obsessed much? Don't lust too much after troons, my boy
[email protected]
t. 10+ years here (you are here forever)
A month is not a year tranny
10 months is not 10 years tranny
What a retarded comeback, truly worth of a tranny obsessed homosexual
>I've definitely been here longer than you.
>t. 2020 tourist 2.0
>Why &hadc1 instead of just hadc1?
Because hadc1 is a struct and most likely these functions alter the struct. In C, structs are passed by copying, which means you can't alter the original. To bypass this, you can get the address of the struct to later modify it with &
>What does the Pollforconversion do and what is HAL_MAX_DELAY?
Pollforconversion waits until hardware decoder is done decoding. HAL_MAX_DELAY means that there is no limit to how long to wait for hardware decoder.
>University of Manchester Pakistani is back again
kys kys kys kys kys