|
Wordle 759 5/6
⬜⬜⬜⬜⬜
⬜⬜⬜🟩🟩
⬜🟨⬜🟩🟩
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Wordle 759 4/6*
⬜🟩⬜⬜🟨
🟩🟩🟨⬜⬜
🟩🟩⬜🟩🟩
🟩🟩🟩🟩🟩
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
⬜🟨⬜⬜🟨
⬜⬜⬜⬜⬜
⬜⬜🟨🟩⬜
⬜🟩⬜🟩🟩
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 759 5/6
🟨⬜⬜⬜⬜
⬜🟨⬜⬜🟨
⬜🟩⬜🟨🟨
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 759 5/6
⬜⬜⬜🟩⬜
⬜⬜⬜🟩🟩
⬜⬜⬜🟩🟩
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
All green 💚.
|
|
|
|
|
Wordle 759 5/6
⬛⬛⬛⬛🟨
⬛⬛⬛🟨🟨
🟨⬛🟨🟩⬛
🟨⬛⬛🟩🟨
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 759 5/6*
⬜⬜🟨⬜⬜
🟨⬜🟩⬜🟨
⬜⬜🟩🟩🟩
🟩⬜🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 759 6/6
⬛⬛⬛🟨🟨
⬛⬛🟨🟩⬛
⬛🟨⬛🟩⬛
⬛⬛⬛🟩🟩
⬛🟨⬛🟩🟩
🟩🟩🟩🟩🟩
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 759 3/6
⬜⬜⬜🟨🟨
🟩🟩🟩⬜⬜
🟩🟩🟩🟩🟩
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
I wanted to turn on an LED on a STM32 devkit.
To do so I needed to turn some GPIO off and on.
It turns out, this isn't so straightforward.
I did not want to tie myself to a particular framework, so I decided to target the CMSIS headers which are available everywhere (I think?), even surprisingly under Arduino.
That means going to the hardware registers directly though.
Between being sidetracked by paying work and doing the research and code for this I've been at this all day.
I've got a class that almost lets me set the various properties of a GPIO pin and turn it off and on.
bool cmsis::gpio_pin_t::output() const {
const int shl = 1<<index;
uint32_t odr = READ_REG(gpio_ports[(size_t)port].reg_base->ODR);
return !!(odr & shl);
}
void cmsis::gpio_pin_t::output_type(pin_output_type_t value) {
const unsigned shl = 1<<index;
MODIFY_REG(gpio_ports[(size_t)port].reg_base->OTYPER, shl, (shl * uint32_t(value)));
}
pin_output_type_t cmsis::gpio_pin_t::output_type() const {
const int shl = 1<<index;
return (pin_output_type_t)(READ_BIT(gpio_ports[(size_t)port].reg_base->OTYPER, shl) >> POSITION_VAL(shl));
}
void cmsis::gpio_pin_t::speed(pin_speed value) {
const unsigned shl = 1<<index;
MODIFY_REG(gpio_ports[(size_t)port].reg_base->OSPEEDR, (GPIO_OSPEEDER_OSPEEDR0 << (POSITION_VAL(shl) * 2U)),
(uint32_t(value) << (POSITION_VAL(shl) * 2U)));
}
pin_speed_t cmsis::gpio_pin_t::speed() const {
const int shl = 1<<index;
return (pin_speed_t)(READ_BIT(gpio_ports[(size_t)port].reg_base->OSPEEDR,
(GPIO_OSPEEDER_OSPEEDR0 << (POSITION_VAL(shl) * 2U))) >> (POSITION_VAL(shl) * 2U));
}
gpio_port_t cmsis::gpio_ports[] = {
{(GPIO_TypeDef *)GPIOA_BASE},
{(GPIO_TypeDef *)GPIOB_BASE}
#if defined GPIOC_BASE
,{(GPIO_TypeDef *)GPIOC_BASE}
#endif
#if defined GPIOD_BASE
,{(GPIO_TypeDef *)GPIOD_BASE}
In arduino it's just stuff like
pinMode(pin,OUTPUT);
digitalWrite(pin,HIGH);
There's a whole mess of behind the scenes there. And I ran face first into it.
I'm several hundred lines of C++ in and I've got it almost working. Just need to enable the clock for the pin group even though I'm not entirely sure what that is, just how to do it.
Here goes everything.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
|
|
|
|
|
I think Mr Boring ( Mike Hankey link ) covered how to do that
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Yeah. But I got this.
*cracks knuckles*
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
|
|
|
|
|
This reminds me of the old days of programming Borland C++, where I had to read the changes on the parallell port via the register. I do not miss it... 
|
|
|
|
|
Message Closed
modified 18-Jul-23 7:44am.
|
|
|
|
|
And I need some of what you are smoking to understand that ...
On second thought, no, I don't. I'd rather remain with at least a dozen brain cells functional. So when you come down, ask again using actual English sentences.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I think he just got over-excited and desperately needed to tell someone. 
|
|
|
|
|
This smells vaguely of pink meat product. I'm wondering what's in the second message he posted in his private profile forum.
|
|
|
|
|
Eureka moment!
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
wrote: Dear immortals, I need some wow gold inspiration to create.
I know all of these words.
I just can't make sense of the order you put them in.
|
|
|
|
|
Just hit an interesting thought and would like veterans' perspective. I support a product that has over 20+ years of accumulated history. As I was writing some comments to explain why or what some code was doing, I've found that the #1 person who read my comments was me. Do comments even matter any more, or am I flattering myself?
Filed under hmmmm
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I comment for myself, because I know I'll be coming back and wondering why I did things the way I did.
Always good for a laugh.
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
I agree. I do it for me first.
That controls the level detail so that I don't have to re-edit my comments constantly.
If someone else has to read it, it helps them too!
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
past maze3 and future maze3 conspire to sabotage me and give me more work
|
|
|
|
|
Decade+ old code and my beautiful friend and I still go through stuff we wrote back then and ask ourselves "What the was I thinking?" That's not a slam on what the code was doing. I mean, it works perfectly fine, but how we did it back then compared to how either of us would do it today.
The comments help, but they can't save us from ourselves as we learn more and more.
|
|
|
|
|
Indeed. Sometimes the dawning of realisation can be a lot quicker. More than once I've written a comment (for my future self) and having spent an hour writing code, suddenly "hear myself" explaining it in the comment and think "That's a *&@$$@% stupid way to do this". Then I spend the next 5 minutes massively simplifying it to the point where it's so blindingly obvious that it doesn't need a comment at all.
Sometimes I just realise that a variable name seemed great when I first defined it, but after using it there's probably something better.
Commenting can be like pair code review - but with your future self instead of someone next to you.
|
|
|
|