<p>Hi <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1301112" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/benpicco">@benpicco</a> , as <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1375137" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aabadie">@aabadie</a> said I had also been working on a wdg implementation but for STM32. Your header definition is quite similar to mine but with the inclusion of callbacks and an extra wdt_init() function.</p>
<p>From the result of discussions on previous wdg PR I had pruposed the following api:</p>
<p><a href="https://github.com/RIOT-OS/RIOT/blob/2b3a1ed7bad20ff98e515cbb49943b6176739d2a/drivers/include/periph/wdg.h#L40-L66">https://github.com/RIOT-OS/RIOT/blob/2b3a1ed7bad20ff98e515cbb49943b6176739d2a/drivers/include/periph/wdg.h#L40-L66</a></p>
<p>I think we should try to merge our definitions, if we get one that works well for sam and stm platforms It should be a better more general implementation of the api.</p>
<p>As I see it wdg_setup(...) and wdg_configure(...) can be merged including callbacks in my header definition or using yours. Regarding wdg_init(), I think it should be discarded in favor of a single wdg_enable()/wdg_start() function since this had already been discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="243391658" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/7374" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/7374/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/7374">#7374</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="424588802" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/11252" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/11252/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/11252">#11252</a>.</p>
<p>I propose we start a new PR for the wdg.h/wdt.h header files and implement on our side against that. What do you think?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/11520?email_source=notifications&email_token=ABE7WYGTQCNONLREYN4GZCLPVLOUBA5CNFSM4HMRYJ3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVL6OFQ#issuecomment-492300054">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBKI6PJHMHGAJ2NWM3PVLOUBANCNFSM4HMRYJ3A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYENKDIHDHUZAHADUBLPVLOUBA5CNFSM4HMRYJ3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVL6OFQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11520?email_source=notifications\u0026email_token=ABE7WYGTQCNONLREYN4GZCLPVLOUBA5CNFSM4HMRYJ3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVL6OFQ#issuecomment-492300054",
"url": "https://github.com/RIOT-OS/RIOT/pull/11520?email_source=notifications\u0026email_token=ABE7WYGTQCNONLREYN4GZCLPVLOUBA5CNFSM4HMRYJ3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVL6OFQ#issuecomment-492300054",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>