Sec. 2. No written statement made by an accused as a result of custodial interrogation is admissible as evidence against him in any criminal proceeding unless it is shown on the face of the statement that:
(a) the accused, prior to making the statement, either received from a magistrate the warning provided in Article 15.17 of this code or received from the person to whom the statement is made a warning that:
(1) he has the right to remain silent and not make any statement at all and that any statement he makes may be used against him at his trial;
(2) any statement he makes may be used as evidence against him in court;
(3) he has the right to have a lawyer present to advise him prior to and during any questioning;
(4) if he is unable to employ a lawyer, he has the right to have a lawyer appointed to advise him prior to and during any questioning; and
(5) he has the right to terminate the interview at any time; and
(b) the accused, prior to and during the making of the statement, knowingly, intelligently, and voluntarily waived the rights set out in the warning prescribed by Subsection (a) of this section.