Update instructions and includes
This commit is contained in:
parent
914572b1ef
commit
5b18f0a58a
18 changed files with 29 additions and 25 deletions
|
|
@ -27,7 +27,11 @@ or updated from before people will need to:
|
|||
|
||||
The header files in `samd` define the common API between the two series. Logic with most code shared
|
||||
lives in a corresponding .c file. Functions with mostly different implementations are in a .c file
|
||||
of the same name under the series specific directory, such as `samd21`.
|
||||
of the same name under the series specific directory, such as `samd21`. Includes are relative to the
|
||||
top of the repo so make sure to add the location of the library to your includes path with something
|
||||
like:
|
||||
|
||||
`-Iperipherals/`
|
||||
|
||||
In your Makefile create a variable which stores the series such as `CHIP_FAMILY` and alter the
|
||||
source files depending on it. For example (from [here](https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/Makefile)):
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "peripherals/dma.h"
|
||||
#include "samd/dma.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "peripherals/events.h"
|
||||
#include "samd/events.h"
|
||||
#include "py/runtime.h"
|
||||
|
||||
uint8_t find_async_event_channel(void) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "common-hal/pulseio/PulseIn.h"
|
||||
#include "common-hal/rotaryio/IncrementalEncoder.h"
|
||||
#include "shared-bindings/microcontroller/__init__.h"
|
||||
#include "peripherals/external_interrupts.h"
|
||||
#include "samd/external_interrupts.h"
|
||||
|
||||
#include "sam.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@
|
|||
#include "mpconfigport.h"
|
||||
|
||||
#ifdef SAMD21
|
||||
#include "peripherals/samd21/pins.h"
|
||||
#include "samd/samd21/pins.h"
|
||||
#endif
|
||||
#ifdef SAMD51
|
||||
#include "peripherals/samd51/pins.h"
|
||||
#include "samd/samd51/pins.h"
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_INCLUDED_ATMEL_SAMD_PERIPHERALS_PINS_H
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
|
||||
#include "hal/include/hal_flash.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "peripherals/dma.h"
|
||||
#include "samd/dma.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/events.h"
|
||||
#include "samd/events.h"
|
||||
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/external_interrupts.h"
|
||||
#include "samd/external_interrupts.h"
|
||||
|
||||
#include "hpl/gclk/hpl_gclk_base.h"
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
#include "sam.h"
|
||||
|
||||
void turn_on_external_interrupt_controller(void) {
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/i2s.h"
|
||||
#include "samd/i2s.h"
|
||||
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
|
||||
#include "hpl/gclk/hpl_gclk_base.h"
|
||||
#include "hpl/pm/hpl_pm_base.h"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "peripherals/timers.h"
|
||||
#include "samd/timers.h"
|
||||
|
||||
//#include "common-hal/pulseio/PulseOut.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
|
||||
#include "hpl_gclk_config.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "peripherals/dma.h"
|
||||
#include "samd/dma.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/events.h"
|
||||
#include "samd/events.h"
|
||||
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/external_interrupts.h"
|
||||
#include "samd/external_interrupts.h"
|
||||
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
#include "sam.h"
|
||||
|
||||
void turn_on_external_interrupt_controller(void) {
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/i2s.h"
|
||||
#include "samd/i2s.h"
|
||||
|
||||
#include "peripherals/clocks.h"
|
||||
#include "samd/clocks.h"
|
||||
|
||||
#include "hpl/gclk/hpl_gclk_base.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "peripherals/timers.h"
|
||||
#include "samd/timers.h"
|
||||
|
||||
#include "hri/hri_gclk_d51.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "peripherals/sercom.h"
|
||||
#include "samd/sercom.h"
|
||||
|
||||
#include "hpl_sercom_config.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue