samd/boards/make-pins.py: Update to use tools/boardgen.py.

This replaces the previous make-pin-table.py with an implementation based
on boardgen.py.

- MICROPY_PY_MACHINE_PIN_BOARD_CPU macro is removed. This isn't optional
  on other ports, so no need for it to be optional on SAMD.
- pin_af_table is removed, and lookups just search the cpu dict instead
  (this saves N*wordsize bytes of firmware size to have this extra table).
- pins.csv is now BOARD,CPU to match other ports.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2023-08-14 11:17:18 +10:00
committed by Damien George
parent ff6c2adfd7
commit 4d568a5bd7
26 changed files with 711 additions and 897 deletions

View File

@@ -92,14 +92,11 @@ typedef struct _pwm_config_t {
#define ALT_FCT_SERCOM1 2
#define ALT_FCT_SERCOM2 3
#if MICROPY_PY_MACHINE_PIN_BOARD_CPU
extern const mp_obj_dict_t machine_pin_cpu_pins_locals_dict;
extern const mp_obj_dict_t machine_pin_board_pins_locals_dict;
#endif
sercom_pad_config_t get_sercom_config(int pin_id, uint8_t sercom);
adc_config_t get_adc_config(int pin_id, int32_t flag);
pwm_config_t get_pwm_config(int pin_id, int wanted_dev, uint8_t used_dev[]);
const machine_pin_obj_t *get_pin_obj_ptr(int pin_id);
const char *pin_name(int id);
const machine_pin_obj_t *pin_find_by_id(int pin_id);
const machine_pin_obj_t *pin_find(mp_obj_t pin);