STRUCT STM32_ADC_COMMON(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

struct stm32_adc_common β€” the stm32 ADC driver's common data, like the shared group chat for all the instances bestie, not just one πŸ’–

okay so this is from the Kernel API Manual and it's literally the struct that every single stm32 ADC instance shares, no cap πŸ‘‘


✨ SYNOPSIS

struct stm32_adc_common {
    void __iomem                    *base;
    phys_addr_t phys_base;
    unsigned long                   rate;
    int vref_mv;
    spinlock_t lock;
 };

🫢 MEMBERS

  • base β€” the base cpu addr for the control registers πŸŽ€ that's where the registers live in cpu-address-land
  • phys_base β€” the base physical addr for those same control registers, iykyk ✨
  • rate β€” the clock rate used for the analog circuitry 🌸 so like, the speed the analog bits are running at
  • vref_mv β€” the vref voltage, measured in mv πŸ’œ
  • lock β€” a spinlock_t, the classic spinlock πŸŒ€ keeping things from stepping on each other

πŸ¦‹ SEE ALSO

  • the kernel file ./drivers/iio/adc/stm32-adc-core.h β€” go read it, it's giving source of truth πŸ“–

bestie reminder: every field above is exactly what the kernel says, so don't go renaming anything πŸ’€

that's the whole page, mwah πŸ’‹ this iconic little entry lives in ./drivers/iio/adc and it's dated October 2026 β€” periodt, go forth and read your headers πŸ§šπŸ’–πŸŒŸ

πŸ“¦ where this page comes from