summaryrefslogtreecommitdiff
path: root/openpicc/application/ssc_picc.c
diff options
context:
space:
mode:
Diffstat (limited to 'openpicc/application/ssc_picc.c')
-rw-r--r--openpicc/application/ssc_picc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/openpicc/application/ssc_picc.c b/openpicc/application/ssc_picc.c
index 79df04e..ab3f2e9 100644
--- a/openpicc/application/ssc_picc.c
+++ b/openpicc/application/ssc_picc.c
@@ -668,6 +668,16 @@ void ssc_tx_init(void)
tx_pdc = (AT91PS_PDC) &(ssc->SSC_RPR);
}
+#ifdef OPENPICC_MODIFIED_BOARD
+void ssc_set_data_gate(int enable)
+{
+ if(enable)
+ AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_GATE);
+ else
+ AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_GATE);
+}
+#endif
+
void ssc_rx_init(void)
{
tc_cdiv_sync_init();
@@ -687,6 +697,11 @@ void ssc_rx_init(void)
AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_CONTROL);
AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_CONTROL);
+
+#ifdef OPENPICC_MODIFIED_BOARD
+ AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_GATE);
+ AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_GATE);
+#endif
AT91F_AIC_ConfigureIt(AT91C_ID_SSC,
OPENPICC_IRQ_PRIO_SSC,
personal git repositories of Harald Welte. Your mileage may vary