(self, cleanup=False)
| 134 | return int(default_mhz * 1_000_000) |
| 135 | |
| 136 | def module_exit(self, cleanup=False): |
| 137 | # logger.debug("spi end") |
| 138 | self.SPI.close() |
| 139 | |
| 140 | self.GPIO_RST_PIN.off() |
| 141 | self.GPIO_DC_PIN.off() |
| 142 | self.GPIO_PWR_PIN.off() |
| 143 | # logger.debug("close 5V, Module enters 0 power consumption ...") |
| 144 | |
| 145 | if cleanup: |
| 146 | self.GPIO_RST_PIN.close() |
| 147 | self.GPIO_DC_PIN.close() |
| 148 | # self.GPIO_CS_PIN.close() |
| 149 | self.GPIO_PWR_PIN.close() |
| 150 | self.GPIO_BUSY_PIN.close() |
| 151 | |
| 152 | |
| 153 |