Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[C/C++] Aufruf von industrial_quad_relay_get_monoflop

Featured Replies

Geschrieben

Moin zusammen,

ich muss leider eine etwas einfache Frage an euch stellen, kann mir bitte jemand sagen, wie der Aufruf von "industrial_quad_relay_get_monoflop" in einem C Programm aussieht?

 

THX a lot!

Geschrieben

Moin,

das stimmt zwar, aber leider bin ich nicht so Fit darin, dass ich direkt verstehen wie das aufzurufen ist. Ich verstehe nur, dass die drei letzten Parameter zurück gegeben werden sollen, aber wie die Syntax in C aussehen muss, damit ich via printf da etwas zurück bekommen würde verstehe ich noch nicht so ganz? Vielleicht könnt ihr mir helfen?

Geschrieben

industrial_quad_relay_get_monoflop() erwartet Pointer auf Variablen in die es dann die drei Werte schreiben kann. Hier ein Beispiel für Pin 0:

 

uint16_t value;
uint32_t time
uint32_t time_remaining;

industrial_quad_relay_get_monoflop(&iqr, 0, &value, &time, &time_remaining);

printf("value %u, time %u, time_remaining %u\n", value, time, time_remaining);

Geschrieben

Ich danke dir vielmals!

 

Ich war schon fast auf dem richtigen Weg  ;)

In meinem Code hatte nur folgende Zeile gefehlt:

 

industrial_quad_relay_get_monoflop(&iqr, 0, &value, &time, &time_remaining);

 

Vielen Dank!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.