fixes, and use the new rsc parsing for some unit pins

This commit is contained in:
2018-02-23 11:24:10 +01:00
parent a60b736834
commit 1a888366af
13 changed files with 111 additions and 151 deletions
+1
View File
@@ -38,6 +38,7 @@ GPIO_TypeDef *hw_port2periph(char port_name, bool *suc)
/** Convert a pin resource to it's LL lib values */
bool hw_pinrsc2ll(Resource rsc, GPIO_TypeDef **port, uint32_t *llpin)
{
if (rsc > R_PF15) return false;
uint32_t index = rsc - R_PA0;
uint32_t pname = (index/16);
uint8_t pnum = (uint8_t) (index % 16);