Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
41 lines (29 loc) · 1.21 KB

File metadata and controls

41 lines (29 loc) · 1.21 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

class SD -- secure digital memory card

The SD card class allows to configure and enable the memory card module of the WiPy and automatically mount it as /sd as part of the file system. There are several pin combinations that can be used to wire the SD card socket to the WiPy and the pins used can be specified in the constructor. Please check the pinout and alternate functions table. for more info regarding the pins which can be remapped to be used with a SD card.

Example usage:

from machine import SD
import os
# clk cmd and dat0 pins must be passed along with
# their respective alternate functions
sd = machine.SD(pins=('GP10', 'GP11', 'GP15'))
os.mount(sd, '/sd')
# do normal file operations

Constructors

Methods

.. method:: sd.init(id=0, pins=('GP10', 'GP11', 'GP15'))

   Enable the SD card. In order to initalize the card, give it a 3-tuple:
   ``(clk_pin, cmd_pin, dat0_pin)``.

.. method:: sd.deinit()

   Disable the SD card.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.