Skip to content

Commit

Permalink
Merge pull request #393 from the-snowwhite/hm2
Browse files Browse the repository at this point in the history
Hostmot2_ol unset output pins upon exit
  • Loading branch information
the-snowwhite authored Feb 5, 2023
2 parents b203148 + c81c362 commit ecf488a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,12 @@ static int delete(const char *name, void *inst, const int inst_size)
{
hm2_soc_t *brd = (hm2_soc_t *)inst;
char buf[MAXNAMELEN];

u32 index;
// Unset outputs
for(u32 i=0;i<20;i=i+4) {
index=(u32)(0x1100 + i);
*((u32 *)(brd->base + index)) = 0;
}
// explicitly free locally allocated strings in case realtime
// continues to run after shutdown of this driver
if(brd->config != NULL)
Expand Down

0 comments on commit ecf488a

Please sign in to comment.